mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 22:00:10 +00:00
Merge pull request #98266 from m-pranav-r/fix-light-visual-instance
Fix light culling mask behavior in Mobile and Compat renderers
This commit is contained in:
commit
ba4e67e55e
1 changed files with 4 additions and 0 deletions
|
|
@ -3036,6 +3036,10 @@ void RendererSceneCull::_scene_cull(CullData &cull_data, InstanceCullResult &cul
|
||||||
|
|
||||||
for (const Instance *E : geom->lights) {
|
for (const Instance *E : geom->lights) {
|
||||||
InstanceLightData *light = static_cast<InstanceLightData *>(E->base_data);
|
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;
|
instance_pair_buffer[idx++] = light->instance;
|
||||||
if (idx == MAX_INSTANCE_PAIRS) {
|
if (idx == MAX_INSTANCE_PAIRS) {
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue