diff --git a/scene/resources/environment.cpp b/scene/resources/environment.cpp index f42ca7c3b..5c85ed598 100644 --- a/scene/resources/environment.cpp +++ b/scene/resources/environment.cpp @@ -150,6 +150,7 @@ float Environment::get_ambient_light_sky_contribution() const { void Environment::set_tonemapper(ToneMapper p_tone_mapper) { tone_mapper = p_tone_mapper; VS::get_singleton()->environment_set_tonemap(environment, VS::EnvironmentToneMapper(tone_mapper), tonemap_exposure, tonemap_white, tonemap_auto_exposure, tonemap_auto_exposure_min, tonemap_auto_exposure_max, tonemap_auto_exposure_speed, tonemap_auto_exposure_grey); + _change_notify(); } Environment::ToneMapper Environment::get_tonemapper() const { @@ -275,6 +276,12 @@ void Environment::_validate_property(PropertyInfo &property) const { } } + if (property.name == "tonemap_white") { + if (tone_mapper == TONE_MAPPER_LINEAR) { + property.usage = PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL; + } + } + static const char *hide_prefixes[] = { "fog_", "auto_exposure_",