summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
Diffstat (limited to 'scene')
-rw-r--r--scene/resources/sky.cpp8
-rw-r--r--scene/resources/sky.h2
2 files changed, 8 insertions, 2 deletions
diff --git a/scene/resources/sky.cpp b/scene/resources/sky.cpp
index dfbf619c01..f9f8ff19e4 100644
--- a/scene/resources/sky.cpp
+++ b/scene/resources/sky.cpp
@@ -536,7 +536,7 @@ void ProceduralSky::_bind_methods() {
BIND_ENUM_CONSTANT(TEXTURE_SIZE_MAX);
}
-ProceduralSky::ProceduralSky() {
+ProceduralSky::ProceduralSky(bool p_desaturate) {
sky = VS::get_singleton()->sky_create();
texture = VS::get_singleton()->texture_create();
@@ -552,6 +552,12 @@ ProceduralSky::ProceduralSky() {
ground_curve = 0.02;
ground_energy = 1;
+ if (p_desaturate) {
+ sky_top_color.set_hsv(sky_top_color.get_h(),0,sky_top_color.get_v());
+ sky_horizon_color.set_hsv(sky_horizon_color.get_h(),0,sky_horizon_color.get_v());
+ ground_bottom_color.set_hsv(ground_bottom_color.get_h(),0,ground_bottom_color.get_v());
+ ground_horizon_color.set_hsv(ground_horizon_color.get_h(),0,ground_horizon_color.get_v());
+ }
sun_color = Color(1, 1, 1);
sun_latitude = 35;
sun_longitude = 0;
diff --git a/scene/resources/sky.h b/scene/resources/sky.h
index 3b410396e0..7327b2a627 100644
--- a/scene/resources/sky.h
+++ b/scene/resources/sky.h
@@ -191,7 +191,7 @@ public:
virtual RID get_rid() const;
- ProceduralSky();
+ ProceduralSky(bool p_desaturate=false);
~ProceduralSky();
};