summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlashscreen <SlashScreen@users.noreply.github.com>2024-08-10 19:18:34 -0700
committerSlashscreen <SlashScreen@users.noreply.github.com>2024-08-13 08:45:38 -0700
commit4457b11ff0d8a4344118dee6ab0955c2dd6c68b9 (patch)
tree475ccb69b51fd4a7275691aa6b377402950fb460
parent88f3b5f9d52f740b24fabfb8bc01b8b7026ba279 (diff)
downloadredot-engine-4457b11ff0d8a4344118dee6ab0955c2dd6c68b9.tar.gz
Apply patch for considering visual layers for DirectionalLight
Co-authored-by: majikayogames <152851004+majikayogames@users.noreply.github.com>
-rw-r--r--servers/rendering/renderer_scene_cull.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/servers/rendering/renderer_scene_cull.cpp b/servers/rendering/renderer_scene_cull.cpp
index b02d3def88..b08698d32a 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<Instance *> lights_with_shadow;
for (Instance *E : scenario->directional_lights) {
- if (!E->visible) {
+ if (!E->visible || !(E->layer_mask & p_visible_layers)) {
continue;
}