summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Pohoreski <ptolemy@lindenlab.com>2022-01-31 20:17:35 +0000
committerMichael Pohoreski <ptolemy@lindenlab.com>2022-01-31 20:17:35 +0000
commit594910a8408f67f1af7c66d5a4dfde3626669245 (patch)
tree4eb0eccd3e420ae78a2a9fc6c51ea0bb788a8da3
parent6344c6f81dd098d6c38b727993f1cf0a6193e37d (diff)
parentd38a273014b672e6dedd8608c9f24dfb43e028ea (diff)
Merged in SL-16722 (pull request #850)
SL-16722 Fix void water not being rendered due to PR 782 skipping second pass of water rendering Approved-by: Euclid Linden Approved-by: Dave Parks
-rw-r--r--indra/newview/lldrawpoolwater.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/indra/newview/lldrawpoolwater.cpp b/indra/newview/lldrawpoolwater.cpp
index 0f2bcf4708..6762b38c39 100644
--- a/indra/newview/lldrawpoolwater.cpp
+++ b/indra/newview/lldrawpoolwater.cpp
@@ -520,9 +520,10 @@ void LLDrawPoolWater::renderWater()
LLColor4 specular(sun_up ? psky->getSunlightColor() : psky->getMoonlightColor());
F32 phase_time = (F32) LLFrameTimer::getElapsedSeconds() * 0.5f;
- bool edge = false;
LLGLSLShader *shader = nullptr;
- do // twice through, once with normal shader bound & once with edge shader bound
+
+ // two passes, first with standard water shader bound, second with edge water shader bound
+ for( int edge = 0 ; edge < 2; edge++ )
{
// select shader
if (underwater && LLPipeline::sWaterReflections)
@@ -675,7 +676,7 @@ void LLDrawPoolWater::renderWater()
gGL.getTexUnit(diffTex)->bind(face->getTexture());
- if (edge == (bool) water->getIsEdgePatch())
+ if ((bool)edge == (bool) water->getIsEdgePatch())
{
face->renderIndexed();
@@ -699,9 +700,7 @@ void LLDrawPoolWater::renderWater()
shader->unbind();
gGL.getTexUnit(bumpTex)->unbind(LLTexUnit::TT_TEXTURE);
gGL.getTexUnit(bumpTex2)->unbind(LLTexUnit::TT_TEXTURE);
-
- edge = !edge;
- } while (!edge);
+ }
gGL.getTexUnit(0)->activate();
gGL.getTexUnit(0)->enable(LLTexUnit::TT_TEXTURE);