summaryrefslogtreecommitdiff
path: root/servers/rendering
diff options
context:
space:
mode:
authorclayjohn <claynjohn@gmail.com>2022-02-16 00:16:56 -0800
committerclayjohn <claynjohn@gmail.com>2022-02-16 00:16:56 -0800
commita38c3a763a8469daab6c5b5d7844f9e2ff5ff42e (patch)
tree7a35be8c147f8bc46aa3a95caf778540042dd0fa /servers/rendering
parent7989149b917c096af67a0566398bee4de83993ac (diff)
Properly exclude lights that are marked as sky only
Diffstat (limited to 'servers/rendering')
-rw-r--r--servers/rendering/renderer_rd/renderer_scene_render_rd.cpp2
1 files changed, 1 insertions, 1 deletions
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<RID> &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;
}