summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorHugo Locurcio <hugo.locurcio@hugo.pro>2022-09-26 15:41:18 +0200
committerHugo Locurcio <hugo.locurcio@hugo.pro>2022-09-26 15:44:30 +0200
commit528db5287bba4b80083c1da1e864ae23508c425b (patch)
treec2b9e5aa96f9583ab56a51089c5a320e4896e0ea /scene
parent581db8b4e60c2a2fa4d0be076030b326784c69bb (diff)
Tweak FogVolume density property to allow sliding to negative values
Negative density is used to subtract fog from the rest of the world. The visible range in the slider was reduced to [-8; 8] as FogVolume density should generally not exceed 8.0 (it can introduce aliasing).
Diffstat (limited to 'scene')
-rw-r--r--scene/resources/fog_material.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/resources/fog_material.cpp b/scene/resources/fog_material.cpp
index 0395ed0346..46b44d681f 100644
--- a/scene/resources/fog_material.cpp
+++ b/scene/resources/fog_material.cpp
@@ -122,7 +122,7 @@ void FogMaterial::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_density_texture", "density_texture"), &FogMaterial::set_density_texture);
ClassDB::bind_method(D_METHOD("get_density_texture"), &FogMaterial::get_density_texture);
- ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "density", PROPERTY_HINT_RANGE, "0.0,16.0,0.0001,or_greater,or_less"), "set_density", "get_density");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "density", PROPERTY_HINT_RANGE, "-8.0,8.0,0.0001,or_greater,or_less"), "set_density", "get_density");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "albedo", PROPERTY_HINT_COLOR_NO_ALPHA), "set_albedo", "get_albedo");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "emission", PROPERTY_HINT_COLOR_NO_ALPHA), "set_emission", "get_emission");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "height_falloff", PROPERTY_HINT_EXP_EASING, "attenuation"), "set_height_falloff", "get_height_falloff");