From 4e593b3e9a78abc51b128b613645b678ab014f37 Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Fri, 26 Nov 2021 00:46:49 +0100 Subject: [PATCH] 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). --- scene/3d/voxel_gi.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/3d/voxel_gi.cpp b/scene/3d/voxel_gi.cpp index c7108cbae01..594423994a5 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");