diff options
author | Graham Linden <graham@lindenlab.com> | 2018-06-12 18:42:07 +0100 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2018-06-12 18:42:07 +0100 |
commit | 67ab0084f87c40bf31d7fadded55cc9ea6299ca2 (patch) | |
tree | 1d8119cd8d0b6078724a8128da37c15321a9f703 /indra/newview/lldrawpoolwlsky.cpp | |
parent | 327ded51298599a0057c4a3baf388956ecfed2e5 (diff) |
Fix env panel forward action.
Make env panel update environment when jumping frame to frame.
Add separate funcs for sun/moon vectors in various coord systems.
Make haze glow only pay attention to sun (i.e. fix sun glow when moon is near horizon in daytime).
Diffstat (limited to 'indra/newview/lldrawpoolwlsky.cpp')
-rw-r--r-- | indra/newview/lldrawpoolwlsky.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp index 0126f1e2ca..4b77e18c15 100644 --- a/indra/newview/lldrawpoolwlsky.cpp +++ b/indra/newview/lldrawpoolwlsky.cpp @@ -151,11 +151,13 @@ void LLDrawPoolWLSky::renderSkyHazeDeferred(const LLVector3& camPosLocal, F32 ca sky_shader->bindTexture(LLShaderMgr::ILLUMINANCE_TEX, gAtmosphere->getIlluminance()); LLSettingsSky::ptr_t psky = LLEnvironment::instance().getCurrentSky(); - LLVector4 light_dir = LLEnvironment::instance().getClampedLightNorm(); + LLVector4 sun_dir = LLEnvironment::instance().getClampedSunNorm(); + LLVector4 moon_dir = LLEnvironment::instance().getClampedMoonNorm(); F32 sunSize = (float)cosf(psky->getSunArcRadians()); sky_shader->uniform1f(LLShaderMgr::SUN_SIZE, sunSize); - sky_shader->uniform3fv(LLShaderMgr::DEFERRED_SUN_DIR, 1, light_dir.mV); + sky_shader->uniform3fv(LLShaderMgr::DEFERRED_SUN_DIR, 1, sun_dir.mV); + sky_shader->uniform3fv(LLShaderMgr::DEFERRED_MOON_DIR, 1, moon_dir.mV); // clouds are rendered along with sky in adv atmo if (gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_CLOUDS) && gSky.mVOSkyp->getCloudNoiseTex()) |