diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2022-12-04 19:19:53 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2022-12-04 19:19:53 +0000 |
commit | e7492e532cb1f3474e34b87eb295edfd06c4204d (patch) | |
tree | 5593235eee5c80abd81c86ee9dcea9d7831579b0 /gfx | |
parent | Generate and use a shadow map (diff) | |
download | ilt-e7492e532cb1f3474e34b87eb295edfd06c4204d.tar.bz2 ilt-e7492e532cb1f3474e34b87eb295edfd06c4204d.tar.xz ilt-e7492e532cb1f3474e34b87eb295edfd06c4204d.zip |
Do not unilluminate the back of objects
Diffstat (limited to 'gfx')
-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 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); } |