diff options
author | Thaddeus Crews <repiteo@outlook.com> | 2024-10-24 13:22:58 -0500 |
---|---|---|
committer | Thaddeus Crews <repiteo@outlook.com> | 2024-10-24 13:22:58 -0500 |
commit | ba4e67e55ecbd23517cc3d7d50f6c50a2abc00b6 (patch) | |
tree | cd140ffe4df7e00179e08fc043bb3647257038b1 /servers | |
parent | 9f908a3a5b185fd781572c46847ec4d539c7cc9a (diff) | |
parent | fcea158927225f05105d36794de3ba0fffeeccb5 (diff) | |
download | redot-engine-ba4e67e55ecbd23517cc3d7d50f6c50a2abc00b6.tar.gz |
Merge pull request #98266 from m-pranav-r/fix-light-visual-instance
Fix light culling mask behavior in Mobile and Compat renderers
Diffstat (limited to 'servers')
-rw-r--r-- | servers/rendering/renderer_scene_cull.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/servers/rendering/renderer_scene_cull.cpp b/servers/rendering/renderer_scene_cull.cpp index ca07444465..ad39faad17 100644 --- a/servers/rendering/renderer_scene_cull.cpp +++ b/servers/rendering/renderer_scene_cull.cpp @@ -3036,6 +3036,10 @@ void RendererSceneCull::_scene_cull(CullData &cull_data, InstanceCullResult &cul for (const Instance *E : geom->lights) { InstanceLightData *light = static_cast<InstanceLightData *>(E->base_data); + if (!(RSG::light_storage->light_get_cull_mask(E->base) & idata.layer_mask)) { + continue; + } + instance_pair_buffer[idx++] = light->instance; if (idx == MAX_INSTANCE_PAIRS) { break; |