From a38c3a763a8469daab6c5b5d7844f9e2ff5ff42e Mon Sep 17 00:00:00 2001 From: clayjohn Date: Wed, 16 Feb 2022 00:16:56 -0800 Subject: Properly exclude lights that are marked as sky only --- servers/rendering/renderer_rd/renderer_scene_render_rd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'servers/rendering/renderer_rd/renderer_scene_render_rd.cpp') diff --git a/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp b/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp index 718825d652..948340f469 100644 --- a/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp +++ b/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp @@ -3286,7 +3286,7 @@ void RendererSceneRenderRD::_setup_lights(const PagedArray &p_lights, const RS::LightType type = storage->light_get_type(base); switch (type) { case RS::LIGHT_DIRECTIONAL: { - if (r_directional_light_count >= cluster.max_directional_lights) { + if (r_directional_light_count >= cluster.max_directional_lights || storage->light_directional_is_sky_only(base)) { continue; } -- cgit v1.2.3