Merge branch 'NDK-ShadowMapping' of https://github.com/DigitalPulseSoftware/NazaraEngine into NDK-ShadowMapping

Former-commit-id: 77ef760d6343058bfdd33e391c0743d5008c8c49
This commit is contained in:
Lynix 2015-08-19 23:23:24 +02:00
commit 0bdfa995b0
2 changed files with 2 additions and 2 deletions

View File

@ -113,7 +113,7 @@ float CalculateSpotShadowFactor(int lightIndex)
float x,y; float x,y;
for (y = -3.5; y <= 3.5; y+= 1.0) for (y = -3.5; y <= 3.5; y+= 1.0)
for (x = -3.5; x <= 3.5; x+= 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; visibility /= 64.0;

File diff suppressed because one or more lines are too long