diff options
author | Ptolemy <ptolemy@lindenlab.com> | 2022-01-28 18:05:18 -0800 |
---|---|---|
committer | Ptolemy <ptolemy@lindenlab.com> | 2022-01-28 18:05:18 -0800 |
commit | d38a273014b672e6dedd8608c9f24dfb43e028ea (patch) | |
tree | 4eb0eccd3e420ae78a2a9fc6c51ea0bb788a8da3 | |
parent | 6344c6f81dd098d6c38b727993f1cf0a6193e37d (diff) |
SL-16722 Fix void water not being rendered due to PR 782 skipping second pass of water rendering
-rw-r--r-- | indra/newview/lldrawpoolwater.cpp | 11 |
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); |