Fix shadows on Basic Lighting.

This commit is contained in:
LuisAntonRebollo 2015-02-15 22:26:05 +01:00
parent 128cca1479
commit 3ad04d050c
2 changed files with 2 additions and 2 deletions

View file

@ -40,7 +40,7 @@ void main()
gl_Position = modelview * vec4(vPosition.xyz, 1.0);
color = vColor;
texCoord = vTexCoord1.st;
texCoord = vTexCoord0.st;
float fromCasterDist = length(vPosition.xyz - shadowCasterPosition) - shadowLength;
fade = 1.0 - clamp( fromCasterDist / shadowLength , 0.0, 1.0 );

View file

@ -40,7 +40,7 @@ void main()
gl_Position = modelview * vec4(vPosition.xyz, 1.0);
color = vColor;
texCoord = vTexCoord1.st;
texCoord = vTexCoord0.st;
float fromCasterDist = length(vPosition.xyz - shadowCasterPosition) - shadowLength;
fade = 1.0 - clamp( fromCasterDist / shadowLength , 0.0, 1.0 );