Graphics/Shader: Fix shadowing

Former-commit-id: 54fc9a019217eef85281c33a8a7becb6fec4f851
This commit is contained in:
Lynix 2015-08-19 13:46:11 +02:00
parent 2b48917176
commit cd3b19ca79
2 changed files with 2 additions and 2 deletions

View File

@ -113,7 +113,7 @@ float CalculateSpotShadowFactor(int lightIndex)
float x,y;
for (y = -3.5; y <= 3.5; y+= 1.0)
for (x = -3.5; x <= 3.5; x+= 1.0)
visibility += textureProj(DirectionalSpotLightShadowMap[lightIndex], lightSpacePos + vec4(x/1024.0 * lightSpacePos.w, y/1024.0 * lightSpacePos.w, 0.05, 0.0));
visibility += (textureProj(DirectionalSpotLightShadowMap[lightIndex], lightSpacePos.xyw + vec3(x/1024.0 * lightSpacePos.w, y/1024.0 * lightSpacePos.w, 0.0)).x >= (lightSpacePos.z - 0.0005)/lightSpacePos.w) ? 1.0 : 0.0;
visibility /= 64.0;

File diff suppressed because one or more lines are too long