summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpoolwlsky.cpp
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2019-02-13 23:58:44 +0000
committerRider Linden <rider@lindenlab.com>2019-02-13 23:58:44 +0000
commit07d509bce6dc06a7ef8b3a640d622d1ed44ae3cc (patch)
tree1d3f6df6406cd8b4a0472ccd24224e3d6dc12325 /indra/newview/lldrawpoolwlsky.cpp
parent5d9915243ba1a93934969e7e203a25c6f4c9f9d1 (diff)
parent65927e0a76aaf8ff4dc268acdb12007265ff3a14 (diff)
Merged in graham_linden/viewer-eep-fixes (pull request #276)
SL-10181, SL-10546
Diffstat (limited to 'indra/newview/lldrawpoolwlsky.cpp')
-rw-r--r--indra/newview/lldrawpoolwlsky.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp
index 313e74d5cd..7e297a05a5 100644
--- a/indra/newview/lldrawpoolwlsky.cpp
+++ b/indra/newview/lldrawpoolwlsky.cpp
@@ -216,6 +216,7 @@ void LLDrawPoolWLSky::renderSkyHazeAdvanced(const LLVector3& camPosLocal, F32 ca
sky_shader->uniform1f(LLShaderMgr::SUN_SIZE, sunSize);
sky_shader->uniform3fv(LLShaderMgr::DEFERRED_SUN_DIR, 1, sun_dir.mV);
sky_shader->uniform3fv(LLShaderMgr::DEFERRED_MOON_DIR, 1, moon_dir.mV);
+
F32 moisture_level = (float)psky->getSkyMoistureLevel();
F32 droplet_radius = (float)psky->getSkyDropletRadius();
@@ -233,6 +234,7 @@ void LLDrawPoolWLSky::renderSkyHazeAdvanced(const LLVector3& camPosLocal, F32 ca
sky_shader->uniformMatrix4fv(LLShaderMgr::INVERSE_PROJECTION_MATRIX, 1, FALSE, inv_proj.m);
sky_shader->uniform1f(LLShaderMgr::SUN_MOON_GLOW_FACTOR, psky->getSunMoonGlowFactor());
+ sky_shader->uniform1i(LLShaderMgr::SUN_UP_FACTOR, psky->getIsSunUp() ? 1 : 0);
sky_shader->uniform3f(sCamPosLocal, camPosLocal.mV[0], camPosLocal.mV[1], camPosLocal.mV[2]);
@@ -270,6 +272,8 @@ void LLDrawPoolWLSky::renderSkyHazeDeferred(const LLVector3& camPosLocal, F32 ca
sky_shader->uniform1f(LLShaderMgr::SUN_MOON_GLOW_FACTOR, psky->getSunMoonGlowFactor());
+ sky_shader->uniform1i(LLShaderMgr::SUN_UP_FACTOR, psky->getIsSunUp() ? 1 : 0);
+
/// Render the skydome
renderDome(origin, camHeightLocal, sky_shader);
@@ -285,6 +289,8 @@ void LLDrawPoolWLSky::renderSkyHaze(const LLVector3& camPosLocal, F32 camHeightL
{
LLGLSPipelineDepthTestSkyBox sky(true, false);
sky_shader->bind();
+ sky_shader->uniform1i(LLShaderMgr::SUN_UP_FACTOR, 1);
+ sky_shader->uniform1f(LLShaderMgr::SUN_MOON_GLOW_FACTOR, 1.0f);
renderDome(origin, camHeightLocal, sky_shader);
sky_shader->unbind();
}