Fix VoxelGI static light pairing
(cherry picked from commit 5e22ded4c9
)
This commit is contained in:
parent
75671b7937
commit
efe99e5479
|
@ -1805,7 +1805,8 @@ void RendererSceneCull::_update_instance(Instance *p_instance) {
|
||||||
pair.pair_mask |= RS::INSTANCE_GEOMETRY_MASK;
|
pair.pair_mask |= RS::INSTANCE_GEOMETRY_MASK;
|
||||||
pair.bvh = &p_instance->scenario->indexers[Scenario::INDEXER_GEOMETRY];
|
pair.bvh = &p_instance->scenario->indexers[Scenario::INDEXER_GEOMETRY];
|
||||||
|
|
||||||
if (RSG::light_storage->light_get_bake_mode(p_instance->base) == RS::LIGHT_BAKE_DYNAMIC) {
|
RS::LightBakeMode bake_mode = RSG::light_storage->light_get_bake_mode(p_instance->base);
|
||||||
|
if (bake_mode == RS::LIGHT_BAKE_STATIC || bake_mode == RS::LIGHT_BAKE_DYNAMIC) {
|
||||||
pair.pair_mask |= (1 << RS::INSTANCE_VOXEL_GI);
|
pair.pair_mask |= (1 << RS::INSTANCE_VOXEL_GI);
|
||||||
pair.bvh2 = &p_instance->scenario->indexers[Scenario::INDEXER_VOLUMES];
|
pair.bvh2 = &p_instance->scenario->indexers[Scenario::INDEXER_VOLUMES];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue