mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-12-26 05:37:13 +01:00
Hide Tonemap White property when tonemapper is Linear in Environment
The whitepoint property isn't used when the tonemapper is Linear.
This commit is contained in:
parent
371b5513d3
commit
08f0acd056
@ -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_",
|
||||
|
Loading…
Reference in New Issue
Block a user