diff options
author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2022-03-02 19:46:48 +0200 |
---|---|---|
committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2022-03-02 19:46:48 +0200 |
commit | f90d17905899d01db76b82b6d647bbecf1c47f23 (patch) | |
tree | dba8f9a514a02a9d86fe25c5d0ffccf30a6b754f /indra/newview/lldrawpoolwater.cpp | |
parent | 064f28b290026be0e77cd38de78b06477a9c0876 (diff) | |
parent | 97a103255e433629f13e2156aa307ca329cdcfc6 (diff) |
Merge branch 'DRTVWR-546' into DRTVWR-539
# Conflicts:
# indra/llcommon/tests/llprocess_test.cpp
# indra/llui/llcombobox.cpp
# indra/llui/llcombobox.h
# indra/newview/VIEWER_VERSION.txt
# indra/newview/llviewertexturelist.cpp
# indra/newview/llvovolume.cpp
Diffstat (limited to 'indra/newview/lldrawpoolwater.cpp')
-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); |