Merge pull request #114557 from mxtherfxcker/fix/SDFGI-ignore-visual-layers

Fix SDFGI ignoring visual layers of geometry instances
This commit is contained in:
Thaddeus Crews 2026-03-06 12:40:13 -06:00
commit 312bdb2ae9
No known key found for this signature in database
GPG key ID: 8C6E5FEB5FC03CCC

View file

@ -3179,7 +3179,7 @@ void RendererSceneCull::_scene_cull(CullData &cull_data, InstanceCullResult &cul
}
}
} else if ((1 << base_type) & RSE::INSTANCE_GEOMETRY_MASK) {
if (idata.flags & InstanceData::FLAG_USES_BAKED_LIGHT) {
if ((idata.flags & InstanceData::FLAG_USES_BAKED_LIGHT) && (cull_data.visible_layers & idata.layer_mask)) {
cull_result.sdfgi_region_geometry_instances[j].push_back(idata.instance_geometry);
mesh_visible = true;
}