diff options
author | clayjohn <claynjohn@gmail.com> | 2022-09-14 17:39:25 -0700 |
---|---|---|
committer | clayjohn <claynjohn@gmail.com> | 2022-09-14 17:39:25 -0700 |
commit | 1b5f422c736c75a34e9357b938d9ba8c589ce3cd (patch) | |
tree | 6e9930d73fb38025aa0213437aef90d0280a5282 /scene/3d/voxel_gi.cpp | |
parent | 20d6672846b3fd1537603ac080116dcc914c10e3 (diff) |
Validate physical light units in GI classes.
Add checks for physical light units in a few more places to ensure they aren't used when disabled.
Diffstat (limited to 'scene/3d/voxel_gi.cpp')
-rw-r--r-- | scene/3d/voxel_gi.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scene/3d/voxel_gi.cpp b/scene/3d/voxel_gi.cpp index c97af087bf..0bb8f646fe 100644 --- a/scene/3d/voxel_gi.cpp +++ b/scene/3d/voxel_gi.cpp @@ -30,6 +30,7 @@ #include "voxel_gi.h" +#include "core/config/project_settings.h" #include "core/core_string_names.h" #include "mesh_instance_3d.h" #include "multimesh_instance_3d.h" @@ -382,7 +383,10 @@ void VoxelGI::bake(Node *p_from_node, bool p_create_visual_debug) { float exposure_normalization = 1.0; if (camera_attributes.is_valid()) { - exposure_normalization = camera_attributes->calculate_exposure_normalization() * camera_attributes->get_exposure_multiplier(); + exposure_normalization = camera_attributes->get_exposure_multiplier(); + if (GLOBAL_GET("rendering/lights_and_shadows/use_physical_light_units")) { + exposure_normalization = camera_attributes->calculate_exposure_normalization(); + } } Voxelizer baker; |