OpenGL2: Fix still projecting sun shadows onto nothing

Increase the range for clamping the screen shadow depth to 1.0 (nothing
drawn). Old epsilon ~0.00000006, new 0.001. This fixes it on another
computer.
This commit is contained in:
Zack Middleton 2024-08-27 16:33:06 -05:00
parent 4c19ff2b55
commit a575c1c710

View file

@ -103,7 +103,7 @@ void main()
vec4 shadowpos = u_ShadowMvp * biasPos; vec4 shadowpos = u_ShadowMvp * biasPos;
if ( depth >= 1.0 - DEPTH_MAX_ERROR ) if ( depth >= 0.999 )
{ {
result = 1.0; result = 1.0;
} }