summarylogtreecommitdiffstats
path: root/ccShader_3D_ColorNormalTex.frag.patch
diff options
context:
space:
mode:
authorGennadiy Chernyshyk2018-07-22 19:36:08 +0300
committerGennadiy Chernyshyk2018-07-22 19:51:32 +0300
commit751d49501b6fc6744500a71927369fef2197fc65 (patch)
treecf72372e5392196765c57169e30c00ea20abc676 /ccShader_3D_ColorNormalTex.frag.patch
parent4769dd8bf8051a9bc219d026b159d8530742b1c0 (diff)
downloadaur-751d49501b6fc6744500a71927369fef2197fc65.tar.gz
Update to 3.17
Diffstat (limited to 'ccShader_3D_ColorNormalTex.frag.patch')
-rw-r--r--ccShader_3D_ColorNormalTex.frag.patch214
1 files changed, 0 insertions, 214 deletions
diff --git a/ccShader_3D_ColorNormalTex.frag.patch b/ccShader_3D_ColorNormalTex.frag.patch
deleted file mode 100644
index 485e97e06872..000000000000
--- a/ccShader_3D_ColorNormalTex.frag.patch
+++ /dev/null
@@ -1,214 +0,0 @@
---- /opt/cocos2d-x/cocos/renderer/ccShader_3D_ColorNormalTex.frag 2017-03-22 15:13:34.000000000 -0400
-+++ /tmp/ccShader_3D_ColorNormalTex.frag 2017-04-21 06:42:24.398482144 -0400
-@@ -1,78 +1,78 @@
-
--const char* cc3D_ColorNormalTex_frag = R"(
-+const char* cc3D_ColorNormalTex_frag = STRINGIFY(
-
--#if (MAX_DIRECTIONAL_LIGHT_NUM > 0)
-+\n#if (MAX_DIRECTIONAL_LIGHT_NUM > 0)\n
- uniform vec3 u_DirLightSourceColor[MAX_DIRECTIONAL_LIGHT_NUM];
- uniform vec3 u_DirLightSourceDirection[MAX_DIRECTIONAL_LIGHT_NUM];
--#endif
--#if (MAX_POINT_LIGHT_NUM > 0)
-+\n#endif\n
-+\n#if (MAX_POINT_LIGHT_NUM > 0)\n
- uniform vec3 u_PointLightSourceColor[MAX_POINT_LIGHT_NUM];
- uniform float u_PointLightSourceRangeInverse[MAX_POINT_LIGHT_NUM];
--#endif
--#if (MAX_SPOT_LIGHT_NUM > 0)
-+\n#endif\n
-+\n#if (MAX_SPOT_LIGHT_NUM > 0)\n
- uniform vec3 u_SpotLightSourceColor[MAX_SPOT_LIGHT_NUM];
- uniform vec3 u_SpotLightSourceDirection[MAX_SPOT_LIGHT_NUM];
- uniform float u_SpotLightSourceInnerAngleCos[MAX_SPOT_LIGHT_NUM];
- uniform float u_SpotLightSourceOuterAngleCos[MAX_SPOT_LIGHT_NUM];
- uniform float u_SpotLightSourceRangeInverse[MAX_SPOT_LIGHT_NUM];
--#endif
-+\n#endif\n
- uniform vec3 u_AmbientLightSourceColor;
-
--#ifdef GL_ES
-+\n#ifdef GL_ES\n
- varying mediump vec2 TextureCoordOut;
-
--#ifdef USE_NORMAL_MAPPING
--#if MAX_DIRECTIONAL_LIGHT_NUM
-+\n#ifdef USE_NORMAL_MAPPING\n
-+\n#if MAX_DIRECTIONAL_LIGHT_NUM\n
- varying mediump vec3 v_dirLightDirection[MAX_DIRECTIONAL_LIGHT_NUM];
--#endif
--#endif
--#if MAX_POINT_LIGHT_NUM
-+\n#endif\n
-+\n#endif\n
-+\n#if MAX_POINT_LIGHT_NUM\n
- varying mediump vec3 v_vertexToPointLightDirection[MAX_POINT_LIGHT_NUM];
--#endif
--#if MAX_SPOT_LIGHT_NUM
-+\n#endif\n
-+\n#if MAX_SPOT_LIGHT_NUM\n
- varying mediump vec3 v_vertexToSpotLightDirection[MAX_SPOT_LIGHT_NUM];
--#ifdef USE_NORMAL_MAPPING
-+\n#ifdef USE_NORMAL_MAPPING\n
- varying mediump vec3 v_spotLightDirection[MAX_SPOT_LIGHT_NUM];
--#endif
--#endif
-+\n#endif\n
-+\n#endif\n
-
--#ifndef USE_NORMAL_MAPPING
--#if ((MAX_DIRECTIONAL_LIGHT_NUM > 0) || (MAX_POINT_LIGHT_NUM > 0) || (MAX_SPOT_LIGHT_NUM > 0))
-+\n#ifndef USE_NORMAL_MAPPING\n
-+\n#if ((MAX_DIRECTIONAL_LIGHT_NUM > 0) || (MAX_POINT_LIGHT_NUM > 0) || (MAX_SPOT_LIGHT_NUM > 0))\n
- varying mediump vec3 v_normal;
--#endif
--#endif
-+\n#endif\n
-+\n#endif\n
-
--#else
-+\n#else\n
-
- varying vec2 TextureCoordOut;
-
--#ifdef USE_NORMAL_MAPPING
--#if MAX_DIRECTIONAL_LIGHT_NUM
-+\n#ifdef USE_NORMAL_MAPPING\n
-+\n#if MAX_DIRECTIONAL_LIGHT_NUM\n
- varying vec3 v_dirLightDirection[MAX_DIRECTIONAL_LIGHT_NUM];
--#endif
--#endif
--#if MAX_POINT_LIGHT_NUM
-+\n#endif\n
-+\n#endif\n
-+\n#if MAX_POINT_LIGHT_NUM\n
- varying vec3 v_vertexToPointLightDirection[MAX_POINT_LIGHT_NUM];
--#endif
--#if MAX_SPOT_LIGHT_NUM
-+\n#endif\n
-+\n#if MAX_SPOT_LIGHT_NUM\n
- varying vec3 v_vertexToSpotLightDirection[MAX_SPOT_LIGHT_NUM];
--#ifdef USE_NORMAL_MAPPING
-+\n#ifdef USE_NORMAL_MAPPING\n
- varying vec3 v_spotLightDirection[MAX_SPOT_LIGHT_NUM];
--#endif
--#endif
-+\n#endif\n
-+\n#endif\n
-
--#ifndef USE_NORMAL_MAPPING
--#if ((MAX_DIRECTIONAL_LIGHT_NUM > 0) || (MAX_POINT_LIGHT_NUM > 0) || (MAX_SPOT_LIGHT_NUM > 0))
-+\n#ifndef USE_NORMAL_MAPPING\n
-+\n#if ((MAX_DIRECTIONAL_LIGHT_NUM > 0) || (MAX_POINT_LIGHT_NUM > 0) || (MAX_SPOT_LIGHT_NUM > 0))\n
- varying vec3 v_normal;
--#endif
--#endif
-+\n#endif\n
-+\n#endif\n
-
--#endif
-+\n#endif\n
-
- uniform vec4 u_color;
--#ifdef USE_NORMAL_MAPPING
-+\n#ifdef USE_NORMAL_MAPPING\n
- uniform sampler2D u_normalTex;
--#endif
-+\n#endif\n
-
- vec3 computeLighting(vec3 normalVector, vec3 lightDirection, vec3 lightColor, float attenuation)
- {
-@@ -85,43 +85,43 @@
- void main(void)
- {
-
--#ifdef USE_NORMAL_MAPPING
-- #if ((MAX_DIRECTIONAL_LIGHT_NUM > 0) || (MAX_POINT_LIGHT_NUM > 0) || (MAX_SPOT_LIGHT_NUM > 0))
-+\n#ifdef USE_NORMAL_MAPPING\n
-+\n #if ((MAX_DIRECTIONAL_LIGHT_NUM > 0) || (MAX_POINT_LIGHT_NUM > 0) || (MAX_SPOT_LIGHT_NUM > 0))\n
- vec3 normal = normalize(2.0 * texture2D(u_normalTex, TextureCoordOut).xyz - 1.0);
-- #endif
--#else
-- #if ((MAX_DIRECTIONAL_LIGHT_NUM > 0) || (MAX_POINT_LIGHT_NUM > 0) || (MAX_SPOT_LIGHT_NUM > 0))
-+\n #endif\n
-+\n#else\n
-+\n #if ((MAX_DIRECTIONAL_LIGHT_NUM > 0) || (MAX_POINT_LIGHT_NUM > 0) || (MAX_SPOT_LIGHT_NUM > 0))\n
- vec3 normal = normalize(v_normal);
-- #endif
--#endif
-+\n #endif\n
-+\n#endif\n
-
- vec4 combinedColor = vec4(u_AmbientLightSourceColor, 1.0);
-
- // Directional light contribution
--#if (MAX_DIRECTIONAL_LIGHT_NUM > 0)
-+\n#if (MAX_DIRECTIONAL_LIGHT_NUM > 0)\n
- for (int i = 0; i < MAX_DIRECTIONAL_LIGHT_NUM; ++i)
- {
--#ifdef USE_NORMAL_MAPPING
-+\n#ifdef USE_NORMAL_MAPPING\n
- vec3 lightDirection = normalize(v_dirLightDirection[i] * 2.0);
--#else
-+\n#else\n
- vec3 lightDirection = normalize(u_DirLightSourceDirection[i] * 2.0);
--#endif
-+\n#endif\n
- combinedColor.xyz += computeLighting(normal, -lightDirection, u_DirLightSourceColor[i], 1.0);
- }
--#endif
-+\n#endif\n
-
- // Point light contribution
--#if (MAX_POINT_LIGHT_NUM > 0)
-+\n#if (MAX_POINT_LIGHT_NUM > 0)\n
- for (int i = 0; i < MAX_POINT_LIGHT_NUM; ++i)
- {
- vec3 ldir = v_vertexToPointLightDirection[i] * u_PointLightSourceRangeInverse[i];
- float attenuation = clamp(1.0 - dot(ldir, ldir), 0.0, 1.0);
- combinedColor.xyz += computeLighting(normal, normalize(v_vertexToPointLightDirection[i]), u_PointLightSourceColor[i], attenuation);
- }
--#endif
-+\n#endif\n
-
- // Spot light contribution
--#if (MAX_SPOT_LIGHT_NUM > 0)
-+\n#if (MAX_SPOT_LIGHT_NUM > 0)\n
- for (int i = 0; i < MAX_SPOT_LIGHT_NUM; ++i)
- {
- // Compute range attenuation
-@@ -129,11 +129,11 @@
- float attenuation = clamp(1.0 - dot(ldir, ldir), 0.0, 1.0);
- vec3 vertexToSpotLightDirection = normalize(v_vertexToSpotLightDirection[i]);
-
--#ifdef USE_NORMAL_MAPPING
-+\n#ifdef USE_NORMAL_MAPPING\n
- vec3 spotLightDirection = normalize(v_spotLightDirection[i] * 2.0);
--#else
-+\n#else\n
- vec3 spotLightDirection = normalize(u_SpotLightSourceDirection[i] * 2.0);
--#endif
-+\n#endif\n
-
- // "-lightDirection" is used because light direction points in opposite direction to spot direction.
- float spotCurrentAngleCos = dot(spotLightDirection, -vertexToSpotLightDirection);
-@@ -143,13 +143,13 @@
- attenuation = clamp(attenuation, 0.0, 1.0);
- combinedColor.xyz += computeLighting(normal, vertexToSpotLightDirection, u_SpotLightSourceColor[i], attenuation);
- }
--#endif
-+\n#endif\n
-
--#if ((MAX_DIRECTIONAL_LIGHT_NUM > 0) || (MAX_POINT_LIGHT_NUM > 0) || (MAX_SPOT_LIGHT_NUM > 0))
-+\n#if ((MAX_DIRECTIONAL_LIGHT_NUM > 0) || (MAX_POINT_LIGHT_NUM > 0) || (MAX_SPOT_LIGHT_NUM > 0))\n
- gl_FragColor = texture2D(CC_Texture0, TextureCoordOut) * u_color * combinedColor;
--#else
-+\n#else\n
- gl_FragColor = texture2D(CC_Texture0, TextureCoordOut) * u_color;
--#endif
-+\n#endif\n
-
- }
--)";
-+);