diff options
Diffstat (limited to 'src/renderergl2/glsl')
-rw-r--r-- | src/renderergl2/glsl/dlight_vp.glsl | 2 | ||||
-rw-r--r-- | src/renderergl2/glsl/fogpass_vp.glsl | 3 | ||||
-rw-r--r-- | src/renderergl2/glsl/generic_vp.glsl | 3 | ||||
-rw-r--r-- | src/renderergl2/glsl/lightall_vp.glsl | 9 | ||||
-rw-r--r-- | src/renderergl2/glsl/pshadow_vp.glsl | 2 | ||||
-rw-r--r-- | src/renderergl2/glsl/shadowfill_vp.glsl | 1 |
6 files changed, 6 insertions, 14 deletions
diff --git a/src/renderergl2/glsl/dlight_vp.glsl b/src/renderergl2/glsl/dlight_vp.glsl index 9566a04c..c326bd78 100644 --- a/src/renderergl2/glsl/dlight_vp.glsl +++ b/src/renderergl2/glsl/dlight_vp.glsl @@ -74,7 +74,7 @@ vec3 DeformPosition(const vec3 pos, const vec3 normal, const vec2 st) void main() { vec3 position = attr_Position; - vec3 normal = attr_Normal * 2.0 - vec3(1.0); + vec3 normal = attr_Normal; #if defined(USE_DEFORM_VERTEXES) position = DeformPosition(position, normal, attr_TexCoord0.st); diff --git a/src/renderergl2/glsl/fogpass_vp.glsl b/src/renderergl2/glsl/fogpass_vp.glsl index 8f7bc728..c8ec9a93 100644 --- a/src/renderergl2/glsl/fogpass_vp.glsl +++ b/src/renderergl2/glsl/fogpass_vp.glsl @@ -102,10 +102,9 @@ void main() #if defined(USE_VERTEX_ANIMATION) vec3 position = mix(attr_Position, attr_Position2, u_VertexLerp); vec3 normal = mix(attr_Normal, attr_Normal2, u_VertexLerp); - normal = normalize(normal - vec3(0.5)); #else vec3 position = attr_Position; - vec3 normal = attr_Normal * 2.0 - vec3(1.0); + vec3 normal = attr_Normal; #endif #if defined(USE_DEFORM_VERTEXES) diff --git a/src/renderergl2/glsl/generic_vp.glsl b/src/renderergl2/glsl/generic_vp.glsl index 8543ffd7..859b4363 100644 --- a/src/renderergl2/glsl/generic_vp.glsl +++ b/src/renderergl2/glsl/generic_vp.glsl @@ -207,10 +207,9 @@ void main() #if defined(USE_VERTEX_ANIMATION) vec3 position = mix(attr_Position, attr_Position2, u_VertexLerp); vec3 normal = mix(attr_Normal, attr_Normal2, u_VertexLerp); - normal = normalize(normal - vec3(0.5)); #else vec3 position = attr_Position; - vec3 normal = attr_Normal * 2.0 - vec3(1.0); + vec3 normal = attr_Normal; #endif #if defined(USE_DEFORM_VERTEXES) diff --git a/src/renderergl2/glsl/lightall_vp.glsl b/src/renderergl2/glsl/lightall_vp.glsl index b9e839de..59051d7c 100644 --- a/src/renderergl2/glsl/lightall_vp.glsl +++ b/src/renderergl2/glsl/lightall_vp.glsl @@ -167,11 +167,6 @@ void main() #endif #endif - normal = normal * 2.0 - vec3(1.0); -#if defined(USE_VERT_TANGENT_SPACE) && defined(USE_LIGHT) && !defined(USE_FAST_LIGHT) - tangent = tangent * 2.0 - vec3(1.0); -#endif - #if defined(USE_TCGEN) vec2 texCoords = GenTexCoords(u_TCGen0, position, normal, u_TCGen0Vector0, u_TCGen0Vector1); #else @@ -195,13 +190,13 @@ void main() #endif #if defined(USE_VERT_TANGENT_SPACE) && defined(USE_LIGHT) && !defined(USE_FAST_LIGHT) - vec3 bitangent = cross(normal, tangent) * (attr_Tangent.w * 2.0 - 1.0); + vec3 bitangent = cross(normal, tangent) * attr_Tangent.w; #endif #if defined(USE_LIGHT_VECTOR) vec3 L = u_LightOrigin.xyz - (position * u_LightOrigin.w); #elif defined(USE_LIGHT) && !defined(USE_FAST_LIGHT) - vec3 L = attr_LightDirection * 2.0 - vec3(1.0); + vec3 L = attr_LightDirection; #if defined(USE_MODELMATRIX) L = (u_ModelMatrix * vec4(L, 0.0)).xyz; #endif diff --git a/src/renderergl2/glsl/pshadow_vp.glsl b/src/renderergl2/glsl/pshadow_vp.glsl index 0f9940cd..07a49855 100644 --- a/src/renderergl2/glsl/pshadow_vp.glsl +++ b/src/renderergl2/glsl/pshadow_vp.glsl @@ -11,5 +11,5 @@ void main() gl_Position = u_ModelViewProjectionMatrix * vec4(attr_Position, 1.0); var_Position = attr_Position; - var_Normal = attr_Normal * 2.0 - vec3(1.0); + var_Normal = attr_Normal; } diff --git a/src/renderergl2/glsl/shadowfill_vp.glsl b/src/renderergl2/glsl/shadowfill_vp.glsl index 7a5cc571..7de901ba 100644 --- a/src/renderergl2/glsl/shadowfill_vp.glsl +++ b/src/renderergl2/glsl/shadowfill_vp.glsl @@ -80,7 +80,6 @@ void main() { vec3 position = mix(attr_Position, attr_Position2, u_VertexLerp); vec3 normal = mix(attr_Normal, attr_Normal2, u_VertexLerp); - normal = normalize(normal - vec3(0.5)); position = DeformPosition(position, normal, attr_TexCoord0.st); |