Skip to content

Commit

Permalink
Merge pull request #92078 from lawnjelly/increase_tight_cull_epsilon
Browse files Browse the repository at this point in the history
Tight shadow culling - increase epsilon to prevent flickering
  • Loading branch information
akien-mga committed May 21, 2024
2 parents ee1f898 + 512b0f1 commit 008fd5f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions servers/rendering/rendering_light_culler.h
Original file line number Diff line number Diff line change
Expand Up @@ -181,14 +181,14 @@ class RenderingLightCuller {
}

// Prevent divide by zero.
if (lc > 0.00001f) {
if (lc > 0.001f) {
// If the summed length of the smaller two
// sides is close to the length of the longest side,
// the points are colinear, and the triangle is near degenerate.
float ld = ((la + lb) - lc) / lc;

// ld will be close to zero for colinear tris.
return ld < 0.00001f;
return ld < 0.001f;
}

// Don't create planes from tiny triangles,
Expand Down

0 comments on commit 008fd5f

Please sign in to comment.