Skip to content

Commit

Permalink
OpenGL2: Fix still projecting sun shadows onto nothing
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
zturtleman committed Aug 28, 2024
1 parent 4c19ff2 commit a575c1c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/renderergl2/glsl/shadowmask_fp.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ void main()

vec4 shadowpos = u_ShadowMvp * biasPos;

if ( depth >= 1.0 - DEPTH_MAX_ERROR )
if ( depth >= 0.999 )
{
result = 1.0;
}
Expand Down

0 comments on commit a575c1c

Please sign in to comment.