diff options
author | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2021-10-07 15:01:14 +0200 |
---|---|---|
committer | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2021-10-07 17:47:52 +0200 |
commit | 265bae824f2a56b343de71f9a846b586d2ce4e9a (patch) | |
tree | e52e42744c45d8dc58ece5a3f8e25f1e2b2ad560 /scene | |
parent | 8afd2171d1f767c13a18b478b8fc8e6cb9df2157 (diff) |
Remove unimplemented `Environment.ambient_light_occlusion_color` property
This property was intended to provide a way to have SSAO or VoxelGI
ambient occlusion with a color other than black. However, it was
dropped during the Vulkan renderer development due to the performance
overhead it caused when the feature wasn't used.
Diffstat (limited to 'scene')
-rw-r--r-- | scene/resources/environment.cpp | 15 | ||||
-rw-r--r-- | scene/resources/environment.h | 3 |
2 files changed, 1 insertions, 17 deletions
diff --git a/scene/resources/environment.cpp b/scene/resources/environment.cpp index cab6c0378a..cb59039852 100644 --- a/scene/resources/environment.cpp +++ b/scene/resources/environment.cpp @@ -173,23 +173,13 @@ Environment::ReflectionSource Environment::get_reflection_source() const { return reflection_source; } -void Environment::set_ao_color(const Color &p_color) { - ao_color = p_color; - _update_ambient_light(); -} - -Color Environment::get_ao_color() const { - return ao_color; -} - void Environment::_update_ambient_light() { RS::get_singleton()->environment_set_ambient_light( environment, ambient_color, RS::EnvironmentAmbientSource(ambient_source), ambient_energy, - ambient_sky_contribution, RS::EnvironmentReflectionSource(reflection_source), - ao_color); + ambient_sky_contribution, RS::EnvironmentReflectionSource(reflection_source)); } // Tonemap @@ -1092,15 +1082,12 @@ void Environment::_bind_methods() { ClassDB::bind_method(D_METHOD("get_ambient_light_sky_contribution"), &Environment::get_ambient_light_sky_contribution); ClassDB::bind_method(D_METHOD("set_reflection_source", "source"), &Environment::set_reflection_source); ClassDB::bind_method(D_METHOD("get_reflection_source"), &Environment::get_reflection_source); - ClassDB::bind_method(D_METHOD("set_ao_color", "color"), &Environment::set_ao_color); - ClassDB::bind_method(D_METHOD("get_ao_color"), &Environment::get_ao_color); ADD_GROUP("Ambient Light", "ambient_light_"); ADD_PROPERTY(PropertyInfo(Variant::INT, "ambient_light_source", PROPERTY_HINT_ENUM, "Background,Disabled,Color,Sky"), "set_ambient_source", "get_ambient_source"); ADD_PROPERTY(PropertyInfo(Variant::COLOR, "ambient_light_color"), "set_ambient_light_color", "get_ambient_light_color"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "ambient_light_sky_contribution", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_ambient_light_sky_contribution", "get_ambient_light_sky_contribution"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "ambient_light_energy", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_ambient_light_energy", "get_ambient_light_energy"); - ADD_PROPERTY(PropertyInfo(Variant::COLOR, "ambient_light_occlusion_color", PROPERTY_HINT_COLOR_NO_ALPHA), "set_ao_color", "get_ao_color"); ADD_GROUP("Reflected Light", "reflected_light_"); ADD_PROPERTY(PropertyInfo(Variant::INT, "reflected_light_source", PROPERTY_HINT_ENUM, "Background,Disabled,Sky"), "set_reflection_source", "get_reflection_source"); diff --git a/scene/resources/environment.h b/scene/resources/environment.h index 0df2c3cc27..46842754f4 100644 --- a/scene/resources/environment.h +++ b/scene/resources/environment.h @@ -116,7 +116,6 @@ private: float ambient_energy = 1.0; float ambient_sky_contribution = 1.0; ReflectionSource reflection_source = REFLECTION_SOURCE_BG; - Color ao_color; void _update_ambient_light(); // Tonemap @@ -250,8 +249,6 @@ public: float get_ambient_light_sky_contribution() const; void set_reflection_source(ReflectionSource p_source); ReflectionSource get_reflection_source() const; - void set_ao_color(const Color &p_color); - Color get_ao_color() const; // Tonemap void set_tonemapper(ToneMapper p_tone_mapper); |