Fixed example-31-rsm.

This commit is contained in:
Branimir Karadžić
2016-10-24 17:34:52 -07:00
parent a43f63e8e2
commit c56538e66d
3 changed files with 5 additions and 1 deletions

View File

@@ -115,7 +115,11 @@ void main()
vec2 texelSize = vec2_splat(u_shadowDimsInv.x);
shadowCoord.xy /= shadowCoord.w;
shadowCoord.xy = shadowCoord.xy*0.5+0.5;
shadowCoord.xy = shadowCoord.xy*0.5 + 0.5;
#if BGFX_SHADER_LANGUAGE_GLSL
shadowCoord.z = shadowCoord.z*0.5 + 0.5;
#endif // BGFX_SHADER_LANGUAGE_GLSL
float visibility = PCF(s_shadowMap, shadowCoord, shadowMapBias, texelSize);