summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpoolwlsky.cpp
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2018-10-05 21:32:42 +0100
committerGraham Linden <graham@lindenlab.com>2018-10-05 21:32:42 +0100
commit5eed233618abd7020e130799be2abe0f986543f6 (patch)
tree9916d719524b39fdda5ee7ca71046fc4ca0bee42 /indra/newview/lldrawpoolwlsky.cpp
parent4f9d8f555efe04924a7730d3c91faaae3ea56825 (diff)
SL-1925
More settings for rainbow/halo atmospheric effects, final default asset UUIDs, and shader mods.
Diffstat (limited to 'indra/newview/lldrawpoolwlsky.cpp')
-rw-r--r--indra/newview/lldrawpoolwlsky.cpp17
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();
}
}