Explorar o código

Merge pull request #92079 from lawnjelly/increase_tight_cull_epsilon3

[3.x] Tight shadow culling - increase epsilon to prevent flickering
lawnjelly hai 1 ano
pai
achega
0dcab10b41
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      servers/visual/visual_server_light_culler.h

+ 2 - 2
servers/visual/visual_server_light_culler.h

@@ -164,14 +164,14 @@ private:
 		}
 
 		// 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,