diff --git a/servers/rendering/rendering_server_light_culler.cpp b/servers/rendering/rendering_server_light_culler.cpp index aced77c48..6f5f72ebf 100644 --- a/servers/rendering/rendering_server_light_culler.cpp +++ b/servers/rendering/rendering_server_light_culler.cpp @@ -228,9 +228,11 @@ bool RenderingServerLightCuller::add_light_camera_planes_directional(const Light // Create a third point from the light direction. Vector3 pt2 = pt0 - p_light_source.dir; - // Create plane from 3 points. - Plane p(pt0, pt1, pt2); - add_cull_plane(p); + if (!_is_colinear_tri(pt0, pt1, pt2)) { + // Create plane from 3 points. + Plane p(pt0, pt1, pt2); + add_cull_plane(p); + } } // Last to 0 edge. @@ -244,9 +246,11 @@ bool RenderingServerLightCuller::add_light_camera_planes_directional(const Light // Create a third point from the light direction. Vector3 pt2 = pt0 - p_light_source.dir; - // Create plane from 3 points. - Plane p(pt0, pt1, pt2); - add_cull_plane(p); + if (!_is_colinear_tri(pt0, pt1, pt2)) { + // Create plane from 3 points. + Plane p(pt0, pt1, pt2); + add_cull_plane(p); + } } #ifdef LIGHT_CULLER_DEBUG_LOGGING