summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorRunitaiLinden <davep@lindenlab.com>2023-06-13 15:36:51 -0500
committerRunitaiLinden <davep@lindenlab.com>2023-06-13 15:36:51 -0500
commitb81aadae1b5026195103a5ae20404daf858ded0c (patch)
treed3e2405af6bc49a5f2641ac4b0b5b7b2756f1a0a /indra
parentad956699c08620903150b9adfc2e8c34ccf5c390 (diff)
SL-19835 Fix for inaccurate water fog on transparent objects when camera is above water.
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/lldrawpoolalpha.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp
index 6aa2316589..060129d275 100644
--- a/indra/newview/lldrawpoolalpha.cpp
+++ b/indra/newview/lldrawpoolalpha.cpp
@@ -243,11 +243,13 @@ void LLDrawPoolAlpha::forwardRender(bool rigged)
//enable writing to alpha for emissive effects
gGL.setColorMask(true, true);
- bool write_depth = rigged ||
+ bool write_depth = rigged ||
LLDrawPoolWater::sSkipScreenCopy
// we want depth written so that rendered alpha will
// contribute to the alpha mask used for impostors
- || LLPipeline::sImpostorRenderAlphaDepthPass;
+ || LLPipeline::sImpostorRenderAlphaDepthPass
+ || getType() == LLDrawPoolAlpha::POOL_ALPHA_PRE_WATER; // needed for accurate water fog
+
LLGLDepthTest depth(GL_TRUE, write_depth ? GL_TRUE : GL_FALSE);