Revision: 48336
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=48336
Author:   alexk
Date:     2012-06-27 14:40:43 +0000 (Wed, 27 Jun 2012)
Log Message:
-----------
Disable some shader which won't compile under GLES
B_GLES is a custom define for GL ES

Modified Paths:
--------------
    
branches/soc-2012-swiss_cheese/source/blender/gpu/shaders/gpu_shader_material.glsl
    
branches/soc-2012-swiss_cheese/source/blender/gpu/shaders/gpu_shader_material.glsl.c

Modified: 
branches/soc-2012-swiss_cheese/source/blender/gpu/shaders/gpu_shader_material.glsl
===================================================================
--- 
branches/soc-2012-swiss_cheese/source/blender/gpu/shaders/gpu_shader_material.glsl
  2012-06-27 14:36:06 UTC (rev 48335)
+++ 
branches/soc-2012-swiss_cheese/source/blender/gpu/shaders/gpu_shader_material.glsl
  2012-06-27 14:40:43 UTC (rev 48336)
@@ -1126,6 +1126,8 @@
        return m3;
 }
 
+#ifndef B_GLES
+
 void mtex_bump_init_objspace( vec3 surf_pos, vec3 surf_norm,
                                                          mat4 mView, mat4 
mViewInv, mat4 mObj, mat4 mObjInv, 
                                                          float 
fPrevMagnitude_in, vec3 vNacc_in,
@@ -1362,6 +1364,9 @@
        perturbed_norm = normalize( vNacc_out );
 }
 
+
+#endif
+
 void mtex_negate_texnormal(vec3 normal, out vec3 outnormal)
 {
        outnormal = vec3(-normal.x, -normal.y, normal.z);
@@ -1468,12 +1473,18 @@
        outvisifac = (visifac < 0.001)? 0.0: visifac;
 }
 
+
 void shade_view(vec3 co, out vec3 view)
 {
        /* handle perspective/orthographic */
+#ifndef B_GLES
        view = (gl_ProjectionMatrix[3][3] == 0.0)? normalize(co): vec3(0.0, 
0.0, -1.0);
+#else
+       view = normalize(co);
+#endif         
 }
 
+
 void shade_tangent_v(vec3 lv, vec3 tang, out vec3 vn)
 {
        vec3 c = cross(lv, tang);
@@ -1848,6 +1859,7 @@
        outspec = spec - vec4(specrgb*shadfac, 0.0);
 }
 
+#ifndef B_GLES
 void test_shadowbuf(vec3 rco, sampler2DShadow shadowmap, mat4 shadowpersmat, 
float shadowbias, float inp, out float result)
 {
        if(inp <= 0.0) {
@@ -1865,6 +1877,7 @@
                        result = 1.0;
        }
 }
+#endif
 
 void test_shadowbuf_vsm(vec3 rco, sampler2D shadowmap, mat4 shadowpersmat, 
float shadowbias, float bleedbias, float inp, out float result)
 {
@@ -1914,8 +1927,11 @@
 void shade_mist_factor(vec3 co, float miststa, float mistdist, float misttype, 
float misi, out float outfac)
 {
        float fac, zcor;
-
+#ifndef B_GLES
        zcor = (gl_ProjectionMatrix[3][3] == 0.0)? length(co): -co[2];
+#else  
+       zcor = length(co);      
+#endif 
        
        fac = clamp((zcor-miststa)/mistdist, 0.0, 1.0);
        if(misttype == 0.0) fac *= fac;
@@ -1974,7 +1990,7 @@
 #define NUM_LIGHTS 3
 
 /* bsdfs */
-
+#ifndef B_GLES
 void node_bsdf_diffuse(vec4 color, float roughness, vec3 N, out vec4 result)
 {
        /* ambient light */
@@ -2042,6 +2058,8 @@
        node_bsdf_diffuse(color, 0.0, N, result);
 }
 
+
+#endif
 /* emission */
 
 void node_emission(vec4 color, float strength, vec3 N, out vec4 result)

Modified: 
branches/soc-2012-swiss_cheese/source/blender/gpu/shaders/gpu_shader_material.glsl.c
===================================================================
--- 
branches/soc-2012-swiss_cheese/source/blender/gpu/shaders/gpu_shader_material.glsl.c
        2012-06-27 14:36:06 UTC (rev 48335)
+++ 
branches/soc-2012-swiss_cheese/source/blender/gpu/shaders/gpu_shader_material.glsl.c
        2012-06-27 14:40:43 UTC (rev 48336)
@@ -1,1485 +1,1490 @@
 /* DataToC output of file <gpu_shader_material_glsl> */
 
-int datatoc_gpu_shader_material_glsl_size = 51212;
+int datatoc_gpu_shader_material_glsl_size = 51386;
 char datatoc_gpu_shader_material_glsl[] = {
- 10,102,108,111, 97,116, 32,101,120,112, 95, 98,
-108,101,110,100,101,114, 40,102,108,111, 97,116, 32,102, 41, 10,123, 10,  
9,114,101,116,117,114,110, 32,112,111,119, 40, 50, 46,
- 55, 49, 56, 50, 56, 49, 56, 50, 56, 52, 54, 44, 32,102, 41, 59, 10,125, 10, 
10,118,111,105,100, 32,114,103, 98, 95,116,111, 95,
-104,115,118, 40,118,101, 99, 52, 32,114,103, 98, 44, 32,111,117,116, 
32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123,
- 10,  9,102,108,111, 97,116, 32, 99,109, 97,120, 44, 32, 99,109,105,110, 44, 
32,104, 44, 32,115, 44, 32,118, 44, 32, 99,100,101,
-108,116, 97, 59, 10,  9,118,101, 99, 51, 32, 99, 59, 10, 10,  9, 99,109, 
97,120, 32, 61, 32,109, 97,120, 40,114,103, 98, 91, 48,
- 93, 44, 32,109, 97,120, 40,114,103, 98, 91, 49, 93, 44, 32,114,103, 98, 91, 
50, 93, 41, 41, 59, 10,  9, 99,109,105,110, 32, 61,
- 32,109,105,110, 40,114,103, 98, 91, 48, 93, 44, 32,109,105,110, 40,114,103, 
98, 91, 49, 93, 44, 32,114,103, 98, 91, 50, 93, 41,
- 41, 59, 10,  9, 99,100,101,108,116, 97, 32, 61, 32, 99,109, 97,120, 45, 
99,109,105,110, 59, 10, 10,  9,118, 32, 61, 32, 99,109,
- 97,120, 59, 10,  9,105,102, 32, 40, 99,109, 97,120, 33, 61, 48, 46, 48, 41, 
10,  9,  9,115, 32, 61, 32, 99,100,101,108,116, 97,
- 47, 99,109, 97,120, 59, 10,  9,101,108,115,101, 32,123, 10,  9,  9,115, 32, 
61, 32, 48, 46, 48, 59, 10,  9,  9,104, 32, 61, 32,
- 48, 46, 48, 59, 10,  9,125, 10, 10,  9,105,102, 32, 40,115, 32, 61, 61, 32, 
48, 46, 48, 41, 32,123, 10,  9,  9,104, 32, 61, 32,
- 48, 46, 48, 59, 10,  9,125, 10,  9,101,108,115,101, 32,123, 10,  9,  9, 99, 
32, 61, 32, 40,118,101, 99, 51, 40, 99,109, 97,120,
- 44, 32, 99,109, 97,120, 44, 32, 99,109, 97,120, 41, 32, 45, 32,114,103, 98, 
46,120,121,122, 41, 47, 99,100,101,108,116, 97, 59,
- 10, 10,  9,  9,105,102, 32, 40,114,103, 98, 46,120, 61, 61, 99,109, 97,120, 
41, 32,104, 32, 61, 32, 99, 91, 50, 93, 32, 45, 32,
- 99, 91, 49, 93, 59, 10,  9,  9,101,108,115,101, 32,105,102, 32, 40,114,103, 
98, 46,121, 61, 61, 99,109, 97,120, 41, 32,104, 32,
- 61, 32, 50, 46, 48, 32, 43, 32, 99, 91, 48, 93, 32, 45, 32, 32, 99, 91, 50, 
93, 59, 10,  9,  9,101,108,115,101, 32,104, 32, 61,
- 32, 52, 46, 48, 32, 43, 32, 99, 91, 49, 93, 32, 45, 32, 99, 91, 48, 93, 59, 
10, 10,  9,  9,104, 32, 47, 61, 32, 54, 46, 48, 59,
- 10, 10,  9,  9,105,102, 32, 40,104, 60, 48, 46, 48, 41, 10,  9,  9,  9,104, 
32, 43, 61, 32, 49, 46, 48, 59, 10,  9,125, 10, 10,
-  9,111,117,116, 99,111,108, 32, 61, 32,118,101, 99, 52, 40,104, 44, 32,115, 
44, 32,118, 44, 32,114,103, 98, 46,119, 41, 59, 10,
-125, 10, 10,118,111,105,100, 32,104,115,118, 95,116,111, 95,114,103, 98, 
40,118,101, 99, 52, 32,104,115,118, 44, 32,111,117,116,
- 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10,  
9,102,108,111, 97,116, 32,105, 44, 32,102, 44, 32,112, 44, 32,
-113, 44, 32,116, 44, 32,104, 44, 32,115, 44, 32,118, 59, 10,  9,118,101, 99, 
51, 32,114,103, 98, 59, 10, 10,  9,104, 32, 61, 32,
-104,115,118, 91, 48, 93, 59, 10,  9,115, 32, 61, 32,104,115,118, 91, 49, 93, 
59, 10,  9,118, 32, 61, 32,104,115,118, 91, 50, 93,
- 59, 10, 10,  9,105,102, 40,115, 61, 61, 48, 46, 48, 41, 32,123, 10,  9,  
9,114,103, 98, 32, 61, 32,118,101, 99, 51, 40,118, 44,
- 32,118, 44, 32,118, 41, 59, 10,  9,125, 10,  9,101,108,115,101, 32,123, 10,  
9,  9,105,102, 40,104, 61, 61, 49, 46, 48, 41, 10,
-  9,  9,  9,104, 32, 61, 32, 48, 46, 48, 59, 10,  9,  9, 10,  9,  9,104, 32, 
42, 61, 32, 54, 46, 48, 59, 10,  9,  9,105, 32, 61,
- 32,102,108,111,111,114, 40,104, 41, 59, 10,  9,  9,102, 32, 61, 32,104, 32, 
45, 32,105, 59, 10,  9,  9,114,103, 98, 32, 61, 32,
-118,101, 99, 51, 40,102, 44, 32,102, 44, 32,102, 41, 59, 10,  9,  9,112, 32, 
61, 32,118, 42, 40, 49, 46, 48, 45,115, 41, 59, 10,
-  9,  9,113, 32, 61, 32,118, 42, 40, 49, 46, 48, 45, 40,115, 42,102, 41, 41, 
59, 10,  9,  9,116, 32, 61, 32,118, 42, 40, 49, 46,
- 48, 45, 40,115, 42, 40, 49, 46, 48, 45,102, 41, 41, 41, 59, 10,  9,  9, 10,  
9,  9,105,102, 32, 40,105, 32, 61, 61, 32, 48, 46,
- 48, 41, 32,114,103, 98, 32, 61, 32,118,101, 99, 51, 40,118, 44, 32,116, 44, 
32,112, 41, 59, 10,  9,  9,101,108,115,101, 32,105,
-102, 32, 40,105, 32, 61, 61, 32, 49, 46, 48, 41, 32,114,103, 98, 32, 61, 
32,118,101, 99, 51, 40,113, 44, 32,118, 44, 32,112, 41,
- 59, 10,  9,  9,101,108,115,101, 32,105,102, 32, 40,105, 32, 61, 61, 32, 50, 
46, 48, 41, 32,114,103, 98, 32, 61, 32,118,101, 99,
- 51, 40,112, 44, 32,118, 44, 32,116, 41, 59, 10,  9,  9,101,108,115,101, 
32,105,102, 32, 40,105, 32, 61, 61, 32, 51, 46, 48, 41,
- 32,114,103, 98, 32, 61, 32,118,101, 99, 51, 40,112, 44, 32,113, 44, 32,118, 
41, 59, 10,  9,  9,101,108,115,101, 32,105,102, 32,
- 40,105, 32, 61, 61, 32, 52, 46, 48, 41, 32,114,103, 98, 32, 61, 32,118,101, 
99, 51, 40,116, 44, 32,112, 44, 32,118, 41, 59, 10,
-  9,  9,101,108,115,101, 32,114,103, 98, 32, 61, 32,118,101, 99, 51, 40,118, 
44, 32,112, 44, 32,113, 41, 59, 10,  9,125, 10, 10,
-  9,111,117,116, 99,111,108, 32, 61, 32,118,101, 99, 52, 40,114,103, 98, 44, 
32,104,115,118, 46,119, 41, 59, 10,125, 10, 10,102,
-108,111, 97,116, 32,115,114,103, 98, 95,116,111, 95,108,105,110,101, 
97,114,114,103, 98, 40,102,108,111, 97,116, 32, 99, 41, 10,
-123, 10,  9,105,102, 40, 99, 32, 60, 32, 48, 46, 48, 52, 48, 52, 53, 41, 10,  
9,  9,114,101,116,117,114,110, 32, 40, 99, 32, 60,
- 32, 48, 46, 48, 41, 63, 32, 48, 46, 48, 58, 32, 99, 32, 42, 32, 40, 49, 46, 
48, 47, 49, 50, 46, 57, 50, 41, 59, 10,  9,101,108,
-115,101, 10,  9,  9,114,101,116,117,114,110, 32,112,111,119, 40, 40, 99, 32, 
43, 32, 48, 46, 48, 53, 53, 41, 42, 40, 49, 46, 48,
- 47, 49, 46, 48, 53, 53, 41, 44, 32, 50, 46, 52, 41, 59, 10,125, 10, 
10,102,108,111, 97,116, 32,108,105,110,101, 97,114,114,103,
- 98, 95,116,111, 95,115,114,103, 98, 40,102,108,111, 97,116, 32, 99, 41, 
10,123, 10,  9,105,102, 40, 99, 32, 60, 32, 48, 46, 48,
- 48, 51, 49, 51, 48, 56, 41, 10,  9,  9,114,101,116,117,114,110, 32, 40, 99, 
32, 60, 32, 48, 46, 48, 41, 63, 32, 48, 46, 48, 58,
- 32, 99, 32, 42, 32, 49, 50, 46, 57, 50, 59, 10,  9,101,108,115,101, 10,  9,  
9,114,101,116,117,114,110, 32, 49, 46, 48, 53, 53,
- 32, 42, 32,112,111,119, 40, 99, 44, 32, 49, 46, 48, 47, 50, 46, 52, 41, 32, 
45, 32, 48, 46, 48, 53, 53, 59, 10,125, 10, 10,118,
-111,105,100, 32,115,114,103, 98, 95,116,111, 95,108,105,110,101, 
97,114,114,103, 98, 40,118,101, 99, 52, 32, 99,111,108, 95,102,
-114,111,109, 44, 32,111,117,116, 32,118,101, 99, 52, 32, 99,111,108, 
95,116,111, 41, 10,123, 10,  9, 99,111,108, 95,116,111, 46,
-114, 32, 61, 32,115,114,103, 98, 95,116,111, 95,108,105,110,101, 
97,114,114,103, 98, 40, 99,111,108, 95,102,114,111,109, 46,114,
- 41, 59, 10,  9, 99,111,108, 95,116,111, 46,103, 32, 61, 32,115,114,103, 98, 
95,116,111, 95,108,105,110,101, 97,114,114,103, 98,
- 40, 99,111,108, 95,102,114,111,109, 46,103, 41, 59, 10,  9, 99,111,108, 
95,116,111, 46, 98, 32, 61, 32,115,114,103, 98, 95,116,
-111, 95,108,105,110,101, 97,114,114,103, 98, 40, 99,111,108, 
95,102,114,111,109, 46, 98, 41, 59, 10,  9, 99,111,108, 95,116,111,
- 46, 97, 32, 61, 32, 99,111,108, 95,102,114,111,109, 46, 97, 59, 10,125, 10, 
10,118,111,105,100, 32,108,105,110,101, 97,114,114,
-103, 98, 95,116,111, 95,115,114,103, 98, 40,118,101, 99, 52, 32, 99,111,108, 
95,102,114,111,109, 44, 32,111,117,116, 32,118,101,
- 99, 52, 32, 99,111,108, 95,116,111, 41, 10,123, 10,  9, 99,111,108, 
95,116,111, 46,114, 32, 61, 32,108,105,110,101, 97,114,114,

@@ Diff output truncated at 10240 characters. @@
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to