summaryrefslogtreecommitdiff
path: root/gfx/gl/shaders
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2022-12-06 18:11:13 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2022-12-06 18:11:13 +0000
commite247d3a28db3d222ff932d78ecf2208616bfd7a8 (patch)
tree95916582c5ed7670afe26fde6249b34fda2be6bc /gfx/gl/shaders
parentDisable depth test, remove unnecesary texture binds and clear for lighting pass (diff)
downloadilt-e247d3a28db3d222ff932d78ecf2208616bfd7a8.tar.bz2
ilt-e247d3a28db3d222ff932d78ecf2208616bfd7a8.tar.xz
ilt-e247d3a28db3d222ff932d78ecf2208616bfd7a8.zip
Tidy up
Diffstat (limited to 'gfx/gl/shaders')
-rw-r--r--gfx/gl/shaders/directionalLight.fs2
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;