blob: c9790afc1acd7ef56e463ac2922b14c8d50d5b1a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
--- /opt/cocos2d-x/cocos/renderer/ccShader_3D_Terrain.frag 2017-03-22 15:13:34.000000000 -0400
+++ /tmp/ccShader_3D_Terrain.frag 2017-04-21 06:42:24.331815063 -0400
@@ -1,18 +1,18 @@
-const char* cc3D_Terrain_frag = R"(
-#ifdef GL_ES
+const char* cc3D_Terrain_frag = STRINGIFY(
+\n#ifdef GL_ES\n
precision mediump float;
-#endif
+\n#endif\n
uniform vec3 u_color;
varying vec2 v_texCoord;
varying vec3 v_normal;
-#ifdef GL_ES
+\n#ifdef GL_ES\n
uniform lowp int u_has_alpha;
uniform lowp int u_has_light_map;
-#else
+\n#else\n
uniform int u_has_alpha;
uniform int u_has_light_map;
-#endif
+\n#endif\n
uniform sampler2D u_alphaMap;
uniform sampler2D u_texture0;
uniform sampler2D u_texture1;
@@ -45,4 +45,4 @@
gl_FragColor = vec4(color.rgb*lightColor.rgb*lightFactor, 1.0);
}
}
-)";
+);
|