diff options
author | Rider Linden <rider@lindenlab.com> | 2018-07-10 16:40:38 +0000 |
---|---|---|
committer | Rider Linden <rider@lindenlab.com> | 2018-07-10 16:40:38 +0000 |
commit | e7ed4b4584ca39194bd3202d3d74defd0f0421d0 (patch) | |
tree | 67565a3f6856b54cf7f86f80901a4aca4d210da7 /indra | |
parent | e61d7ac0098d89cc6b124dda2e040120c01d2bee (diff) | |
parent | cafea5d9bb80669509597c6f2ee180ac29c687ab (diff) |
Merged in graham_linden/viewer-eep-graham (pull request #19)
Fix mat stack overflow and broken snapshots in ALM.
Approved-by: Rider Linden <rider@lindenlab.com>
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/app_settings/settings.xml | 2 | ||||
-rw-r--r-- | indra/newview/lldrawpoolwlsky.cpp | 14 | ||||
-rw-r--r-- | indra/newview/pipeline.cpp | 1 |
3 files changed, 13 insertions, 4 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index c058d33e52..16afdbe9bc 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -8664,7 +8664,7 @@ <key>Type</key> <string>Boolean</string> <key>Value</key> - <integer>1</integer> + <integer>0</integer> </map> <key>RenderLocalLights</key> <map> diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp index 9f8511a937..90d017dd0b 100644 --- a/indra/newview/lldrawpoolwlsky.cpp +++ b/indra/newview/lldrawpoolwlsky.cpp @@ -116,9 +116,6 @@ void LLDrawPoolWLSky::endDeferredPass(S32 pass) void LLDrawPoolWLSky::renderFsSky(const LLVector3& camPosLocal, F32 camHeightLocal, LLGLSLShader * shader) const { - // Draw WL Sky w/ normal cam pos (where you are) for adv atmo sky - //gGL.syncMatrices(); - sky_shader->uniform3f(sCamPosLocal, camPosLocal.mV[0], camPosLocal.mV[1], camPosLocal.mV[2]); gSky.mVOWLSkyp->drawFsSky(); } @@ -176,6 +173,13 @@ 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); + llassert(sky_shader->getUniformLocation(LLShaderMgr::INVERSE_PROJECTION_MATRIX)); + + glh::matrix4f proj_mat = get_current_projection(); + glh::matrix4f inv_proj = proj_mat.inverse(); + + sky_shader->uniformMatrix4fv(LLShaderMgr::INVERSE_PROJECTION_MATRIX, 1, FALSE, inv_proj.m); + // clouds are rendered along with sky in adv atmo if (gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_CLOUDS) && gSky.mVOSkyp->getCloudNoiseTex()) { @@ -183,6 +187,8 @@ void LLDrawPoolWLSky::renderSkyHazeDeferred(const LLVector3& camPosLocal, F32 ca sky_shader->bindTexture(LLShaderMgr::CLOUD_NOISE_MAP_NEXT, gSky.mVOSkyp->getCloudNoiseTexNext()); } + sky_shader->uniform3f(sCamPosLocal, camPosLocal.mV[0], camPosLocal.mV[1], camPosLocal.mV[2]); + renderFsSky(camPosLocal, camHeightLocal, sky_shader); sky_shader->unbind(); @@ -459,6 +465,8 @@ void LLDrawPoolWLSky::renderDeferred(S32 pass) gGL.translatef(origin.mV[0], origin.mV[1], origin.mV[2]); renderHeavenlyBodies(); + + gGL.popMatrix(); } } gGL.setColorMask(true, true); diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index aadd059546..c33903dff9 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -12014,3 +12014,4 @@ bool LLPipeline::useAdvancedAtmospherics() const { return sUseAdvancedAtmospherics; } + |