summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorPtolemy <ptolemy@lindenlab.com>2020-09-11 19:01:08 -0700
committerPtolemy <ptolemy@lindenlab.com>2020-09-11 19:01:08 -0700
commitd26f17efd565b189e4ed79ede674a493f4abd97a (patch)
tree50238ef98cdf97ace6eacfb04b27f285c1862b13 /indra
parent98578ddc7943ddcc4dfb4c3c4faaf91e68170b11 (diff)
SL-13768 Remove glow from moon when sun is down due to it using the sun glow setting
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/lldrawpoolwlsky.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp
index b0eb1a405b..de79a47562 100644
--- a/indra/newview/lldrawpoolwlsky.cpp
+++ b/indra/newview/lldrawpoolwlsky.cpp
@@ -184,6 +184,7 @@ void LLDrawPoolWLSky::renderSkyHazeDeferred(const LLVector3& camPosLocal, F32 ca
((LLSettingsVOSky*)psky.get())->updateShader(sky_shader);
+ bool is_sun_up = psky->getIsSunUp();
F32 moisture_level = (float)psky->getSkyMoistureLevel();
F32 droplet_radius = (float)psky->getSkyDropletRadius();
F32 ice_level = (float)psky->getSkyIceLevel();
@@ -199,9 +200,9 @@ void LLDrawPoolWLSky::renderSkyHazeDeferred(const LLVector3& camPosLocal, F32 ca
sky_shader->uniform1f(LLShaderMgr::DROPLET_RADIUS, droplet_radius);
sky_shader->uniform1f(LLShaderMgr::ICE_LEVEL, ice_level);
- sky_shader->uniform1f(LLShaderMgr::SUN_MOON_GLOW_FACTOR, psky->getSunMoonGlowFactor());
+ sky_shader->uniform1f(LLShaderMgr::SUN_MOON_GLOW_FACTOR, is_sun_up ? psky->getSunMoonGlowFactor() : 0.0f ); // SL-13768
- sky_shader->uniform1i(LLShaderMgr::SUN_UP_FACTOR, psky->getIsSunUp() ? 1 : 0);
+ sky_shader->uniform1i(LLShaderMgr::SUN_UP_FACTOR, is_sun_up ? 1 : 0);
/// Render the skydome
renderDome(origin, camHeightLocal, sky_shader);