From e247d3a28db3d222ff932d78ecf2208616bfd7a8 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Tue, 6 Dec 2022 18:11:13 +0000 Subject: Tidy up --- gfx/gl/shaders/directionalLight.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gfx/gl/shaders') 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; -- cgit v1.2.3