diff options
author | Rider Linden <rider@lindenlab.com> | 2018-10-01 16:21:16 +0000 |
---|---|---|
committer | Rider Linden <rider@lindenlab.com> | 2018-10-01 16:21:16 +0000 |
commit | 1d94f7e9ebd663853c81d60aec796accadf43c70 (patch) | |
tree | bad6bfd113e55526105bc310530733758cdb3a21 /indra/newview/lldrawpoolwater.cpp | |
parent | 59a4a215de733926dfdb0d28a86ce5bfdfe84c43 (diff) | |
parent | ae099c639fe45a13454d50526b1c8610ee98ea83 (diff) |
Merged in graham_linden/viewer-eep-graham (pull request #122)
SL-1655
Diffstat (limited to 'indra/newview/lldrawpoolwater.cpp')
-rw-r--r-- | indra/newview/lldrawpoolwater.cpp | 40 |
1 files changed, 8 insertions, 32 deletions
diff --git a/indra/newview/lldrawpoolwater.cpp b/indra/newview/lldrawpoolwater.cpp index 7a25e62651..9eb61a1a1f 100644 --- a/indra/newview/lldrawpoolwater.cpp +++ b/indra/newview/lldrawpoolwater.cpp @@ -695,43 +695,19 @@ void LLDrawPoolWater::shade() water_color.mV[3] = 0.9f; } - { - LLGLEnable depth_clamp(gGLManager.mHasDepthClamp ? GL_DEPTH_CLAMP : 0); + { LLGLDisable cullface(GL_CULL_FACE); - for (std::vector<LLFace*>::iterator iter = mDrawFace.begin(); - iter != mDrawFace.end(); iter++) - { - LLFace *face = *iter; - if (voskyp->isReflFace(face)) - { - continue; - } + sNeedsReflectionUpdate = TRUE; + sNeedsDistortionUpdate = TRUE; - LLVOWater* water = (LLVOWater*) face->getViewerObject(); + for (std::vector<LLFace*>::iterator iter = mDrawFace.begin(); iter != mDrawFace.end(); iter++) + { + LLFace *face = *iter; gGL.getTexUnit(diffTex)->bind(face->getTexture()); - - sNeedsReflectionUpdate = TRUE; - - if (water->getUseTexture() || !water->getIsEdgePatch()) - { - sNeedsDistortionUpdate = TRUE; - face->renderIndexed(); - } - // using squash clip for deferred rendering makes the horizon lines match - // between ALM and non-ALM rendering (SL-1655), but introduces an ugly seem between - // near and far water(SL-9696)...we're going to live with the former and not cause the latter - else if (gGLManager.mHasDepthClamp || deferred_render) - { - face->renderIndexed(); - } - else - { - LLGLSquashToFarClip far_clip(get_current_projection()); - face->renderIndexed(); - } + face->renderIndexed(); } - } + } shader->disableTexture(LLShaderMgr::ENVIRONMENT_MAP, LLTexUnit::TT_CUBE_MAP); shader->disableTexture(LLShaderMgr::WATER_SCREENTEX); |