From 4457b11ff0d8a4344118dee6ab0955c2dd6c68b9 Mon Sep 17 00:00:00 2001 From: Slashscreen Date: Sat, 10 Aug 2024 19:18:34 -0700 Subject: [PATCH] Apply patch for considering visual layers for DirectionalLight Co-authored-by: majikayogames <152851004+majikayogames@users.noreply.github.com> --- servers/rendering/renderer_scene_cull.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/servers/rendering/renderer_scene_cull.cpp b/servers/rendering/renderer_scene_cull.cpp index b02d3def88f..b08698d32a3 100644 --- a/servers/rendering/renderer_scene_cull.cpp +++ b/servers/rendering/renderer_scene_cull.cpp @@ -3089,7 +3089,7 @@ void RendererSceneCull::_render_scene(const RendererSceneRender::CameraData *p_c Vector lights_with_shadow; for (Instance *E : scenario->directional_lights) { - if (!E->visible) { + if (!E->visible || !(E->layer_mask & p_visible_layers)) { continue; }