From e7492e532cb1f3474e34b87eb295edfd06c4204d Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 4 Dec 2022 19:19:53 +0000 Subject: Do not unilluminate the back of objects --- gfx/gl/shaders/directionalLight.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gfx') diff --git a/gfx/gl/shaders/directionalLight.fs b/gfx/gl/shaders/directionalLight.fs index 5350bf3..04715ce 100644 --- a/gfx/gl/shaders/directionalLight.fs +++ b/gfx/gl/shaders/directionalLight.fs @@ -23,5 +23,5 @@ main() discard; } const vec3 Normal = texture(gNormal, TexCoords).rgb; - FragColor = dot(-lightDirection, Normal) * lightColour; + FragColor = max(dot(-lightDirection, Normal) * lightColour, 0); } -- cgit v1.2.3