summaryrefslogtreecommitdiff
path: root/scene/3d
diff options
context:
space:
mode:
authorHugo Locurcio <hugo.locurcio@hugo.pro>2021-11-26 00:46:49 +0100
committerHugo Locurcio <hugo.locurcio@hugo.pro>2021-11-26 00:47:31 +0100
commit4e593b3e9a78abc51b128b613645b678ab014f37 (patch)
tree8a1eaa43c7d2083489ba3ace104579eac98e164e /scene/3d
parent2681d93b8a2f52eaae0f96c682f536704f2a7b78 (diff)
Fix VoxelGIData dynamic range property being treated as integer
Floating-point values are accepted as dynamic range settings. This also clamps the lowest value to 1.0, as there's no practical use case for going below 1.0 (it introduces clipping without improving precision).
Diffstat (limited to 'scene/3d')
-rw-r--r--scene/3d/voxel_gi.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/3d/voxel_gi.cpp b/scene/3d/voxel_gi.cpp
index c7108cbae0..594423994a 100644
--- a/scene/3d/voxel_gi.cpp
+++ b/scene/3d/voxel_gi.cpp
@@ -227,7 +227,7 @@ void VoxelGIData::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::DICTIONARY, "_data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR | PROPERTY_USAGE_INTERNAL), "_set_data", "_get_data");
- ADD_PROPERTY(PropertyInfo(Variant::INT, "dynamic_range", PROPERTY_HINT_RANGE, "0,8,0.01"), "set_dynamic_range", "get_dynamic_range");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "dynamic_range", PROPERTY_HINT_RANGE, "1,8,0.01"), "set_dynamic_range", "get_dynamic_range");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "energy", PROPERTY_HINT_RANGE, "0,64,0.01"), "set_energy", "get_energy");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "bias", PROPERTY_HINT_RANGE, "0,8,0.01"), "set_bias", "get_bias");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "normal_bias", PROPERTY_HINT_RANGE, "0,8,0.01"), "set_normal_bias", "get_normal_bias");