diff options
Diffstat (limited to 'gfx/gl/shaders')
-rw-r--r-- | gfx/gl/shaders/directionalLight.fs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gfx/gl/shaders/directionalLight.fs b/gfx/gl/shaders/directionalLight.fs index 04715ce..d1e60ee 100644 --- a/gfx/gl/shaders/directionalLight.fs +++ b/gfx/gl/shaders/directionalLight.fs @@ -17,7 +17,7 @@ void main() { const vec3 Position = texture(gPosition, TexCoords).xyz; - const vec4 PositionInLightSpace = (lightViewProjection * vec4(Position, 1)) * 0.5 + 0.5; + const vec3 PositionInLightSpace = ((lightViewProjection * vec4(Position, 1.0f)) * 0.5 + 0.5).xyz; const float lightSpaceDepth = texture(shadowMap, PositionInLightSpace.xy).r; if (lightSpaceDepth < PositionInLightSpace.z) { discard; |