|
@@ -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");
|