Skip to content

Commit ba4e67e

Browse files
committed
Merge pull request godotengine#98266 from m-pranav-r/fix-light-visual-instance
Fix light culling mask behavior in Mobile and Compat renderers
2 parents 9f908a3 + fcea158 commit ba4e67e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

servers/rendering/renderer_scene_cull.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3036,6 +3036,10 @@ void RendererSceneCull::_scene_cull(CullData &cull_data, InstanceCullResult &cul
30363036

30373037
for (const Instance *E : geom->lights) {
30383038
InstanceLightData *light = static_cast<InstanceLightData *>(E->base_data);
3039+
if (!(RSG::light_storage->light_get_cull_mask(E->base) & idata.layer_mask)) {
3040+
continue;
3041+
}
3042+
30393043
instance_pair_buffer[idx++] = light->instance;
30403044
if (idx == MAX_INSTANCE_PAIRS) {
30413045
break;

0 commit comments

Comments
 (0)