From d7ad30a2d4dfd83f93b0150464214f2df776eb9c Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Wed, 27 Feb 2019 17:07:31 -0800 Subject: SL-10566 part the fourth Fix water rendering causing distortion map update very frame. Reduce binds in alpha draw pool for HUD atmo suppression (may regress HUD lighting weirdness). Add ability to retrieve current user clip plane so it can be saved/restored around water map gen. Leave render type masks as is after reflection map render to get detail filtering applied to distortion map again. Re-enable occlusion in distortion map rendering. --- indra/newview/lldrawpoolwater.cpp | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'indra/newview/lldrawpoolwater.cpp') diff --git a/indra/newview/lldrawpoolwater.cpp b/indra/newview/lldrawpoolwater.cpp index f5a41fd5f6..5760a28049 100644 --- a/indra/newview/lldrawpoolwater.cpp +++ b/indra/newview/lldrawpoolwater.cpp @@ -619,9 +619,6 @@ void LLDrawPoolWater::shade2(bool edge, LLGLSLShader* shader, const LLColor3& li { LLGLDisable cullface(GL_CULL_FACE); - sNeedsReflectionUpdate = TRUE; - sNeedsDistortionUpdate = TRUE; - if (edge) { for (std::vector::iterator iter = mDrawFace.begin(); iter != mDrawFace.end(); iter++) @@ -632,10 +629,14 @@ void LLDrawPoolWater::shade2(bool edge, LLGLSLShader* shader, const LLColor3& li LLVOWater* water = (LLVOWater*) face->getViewerObject(); gGL.getTexUnit(diffTex)->bind(face->getTexture()); - bool edge_patch = water && water->getIsEdgePatch(); - if (edge_patch) + if (water) { - face->renderIndexed(); + bool edge_patch = water->getIsEdgePatch(); + if (edge_patch) + { + sNeedsReflectionUpdate = TRUE; + face->renderIndexed(); + } } } } @@ -650,10 +651,15 @@ void LLDrawPoolWater::shade2(bool edge, LLGLSLShader* shader, const LLColor3& li LLVOWater* water = (LLVOWater*) face->getViewerObject(); gGL.getTexUnit(diffTex)->bind(face->getTexture()); - bool edge_patch = water && water->getIsEdgePatch(); - if (!edge_patch) + if (water) { - face->renderIndexed(); + bool edge_patch = water->getIsEdgePatch(); + if (!edge_patch) + { + sNeedsReflectionUpdate = TRUE; + sNeedsDistortionUpdate = TRUE; + face->renderIndexed(); + } } } } -- cgit v1.2.3