diff options
author | Juan Linietsky <reduzio@gmail.com> | 2018-11-18 15:43:49 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2018-11-18 15:43:49 -0300 |
commit | afe4f2080a26629e1d93076b049be9eede489da2 (patch) | |
tree | 0f8628b82cb71e7f39a58542749d83bc67d36177 /scene/resources | |
parent | 83afc6170a03e9c70298881aed83640fb4ed8403 (diff) |
Make sky and ground energy do something, fixes #18856
Diffstat (limited to 'scene/resources')
-rw-r--r-- | scene/resources/sky_box.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scene/resources/sky_box.cpp b/scene/resources/sky_box.cpp index a6a52c7bba..347bca4400 100644 --- a/scene/resources/sky_box.cpp +++ b/scene/resources/sky_box.cpp @@ -190,9 +190,15 @@ Ref<Image> ProceduralSky::_generate_sky() { float c = (v_angle - (Math_PI * 0.5)) / (Math_PI * 0.5); color = ground_horizon_linear.linear_interpolate(ground_bottom_linear, Math::ease(c, ground_curve)); + color.r *= ground_energy; + color.g *= ground_energy; + color.b *= ground_energy; } else { float c = v_angle / (Math_PI * 0.5); color = sky_horizon_linear.linear_interpolate(sky_top_linear, Math::ease(1.0 - c, sky_curve)); + color.r *= sky_energy; + color.g *= sky_energy; + color.b *= sky_energy; float sun_angle = Math::rad2deg(Math::acos(CLAMP(sun.dot(normal), -1.0, 1.0))); |