From 5e22ded4c90c41985e6986c2d1d3990d5289b3f7 Mon Sep 17 00:00:00 2001 From: bitsawer Date: Tue, 29 Aug 2023 14:58:56 +0300 Subject: [PATCH] Fix VoxelGI static light pairing --- servers/rendering/renderer_scene_cull.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/servers/rendering/renderer_scene_cull.cpp b/servers/rendering/renderer_scene_cull.cpp index 45bbcf51c4d..e3942e680cf 100644 --- a/servers/rendering/renderer_scene_cull.cpp +++ b/servers/rendering/renderer_scene_cull.cpp @@ -1805,7 +1805,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]; }