diff options
author | Rider Linden <rider@lindenlab.com> | 2018-10-05 21:44:23 +0000 |
---|---|---|
committer | Rider Linden <rider@lindenlab.com> | 2018-10-05 21:44:23 +0000 |
commit | fc5a30a6949e6127a27f9bbadb51a287195145f6 (patch) | |
tree | 182ada6abf5bc3655bee7647883b2659aa12b9a1 /indra/newview/lldrawpoolwlsky.cpp | |
parent | b030d7036f87d30babb4a8df8d256113f46182e9 (diff) | |
parent | 5eed233618abd7020e130799be2abe0f986543f6 (diff) |
Merged in graham_linden/viewer-eep-graham (pull request #134)
SL-1925
Diffstat (limited to 'indra/newview/lldrawpoolwlsky.cpp')
-rw-r--r-- | indra/newview/lldrawpoolwlsky.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp index 5104dc18fd..d82cff516e 100644 --- a/indra/newview/lldrawpoolwlsky.cpp +++ b/indra/newview/lldrawpoolwlsky.cpp @@ -176,6 +176,13 @@ void LLDrawPoolWLSky::renderSkyHazeDeferred(const LLVector3& camPosLocal, F32 ca sky_shader->bindTexture(LLShaderMgr::ILLUMINANCE_TEX, gAtmosphere->getIlluminance()); LLSettingsSky::ptr_t psky = LLEnvironment::instance().getCurrentSky(); + + LLViewerTexture* rainbow_tex = gSky.mVOSkyp->getRainbowTex(); + LLViewerTexture* halo_tex = gSky.mVOSkyp->getHaloTex(); + + sky_shader->bindTexture(LLShaderMgr::RAINBOW_MAP, rainbow_tex); + sky_shader->bindTexture(LLShaderMgr::HALO_MAP, halo_tex); + LLVector3 sun_dir = LLEnvironment::instance().getSunDirection(); LLVector3 moon_dir = LLEnvironment::instance().getMoonDirection(); @@ -184,6 +191,14 @@ void LLDrawPoolWLSky::renderSkyHazeDeferred(const LLVector3& camPosLocal, F32 ca 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(); + F32 ice_level = (float)psky->getSkyIceLevel(); + + sky_shader->uniform1f(LLShaderMgr::MOISTURE_LEVEL, moisture_level); + sky_shader->uniform1f(LLShaderMgr::DROPLET_RADIUS, droplet_radius); + sky_shader->uniform1f(LLShaderMgr::ICE_LEVEL, ice_level); + llassert(sky_shader->getUniformLocation(LLShaderMgr::INVERSE_PROJECTION_MATRIX)); glh::matrix4f proj_mat = get_current_projection(); @@ -195,7 +210,7 @@ void LLDrawPoolWLSky::renderSkyHazeDeferred(const LLVector3& camPosLocal, F32 ca LLGLDisable cull(GL_CULL_FACE); renderFsSky(camPosLocal, camHeightLocal, sky_shader); - + sky_shader->unbind(); } } |