Skip to content

Commit

Permalink
Merge pull request #81124 from bitsawer/fix_voxelgi_static_lights
Browse files Browse the repository at this point in the history
Fix VoxelGI static light pairing
  • Loading branch information
akien-mga authored Oct 5, 2023
2 parents d351d40 + 5e22ded commit f2ba8ec
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion servers/rendering/renderer_scene_cull.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1820,7 +1820,8 @@ void RendererSceneCull::_update_instance(Instance *p_instance) {
pair.pair_mask |= RS::INSTANCE_GEOMETRY_MASK;
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.bvh2 = &p_instance->scenario->indexers[Scenario::INDEXER_VOLUMES];
}
Expand Down

0 comments on commit f2ba8ec

Please sign in to comment.