summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorRunitai Linden <davep@lindenlab.com>2021-12-08 08:40:26 -0600
committerRunitai Linden <davep@lindenlab.com>2021-12-08 08:40:26 -0600
commit25e993cd3a961a08d625ac18c31e92a0342a1fe1 (patch)
tree027c23b7aad6a903f7f5ab22578d1331ec33fb79 /indra/newview
parent8a18b5e427e261ccc60eeb673f140eff3690bf7b (diff)
SL-16469 Fix for reflection/refraction passes breaking occlusion queries.
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/pipeline.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index dce63e06fb..56fe4ac5af 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -9122,6 +9122,10 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
if (LLPipeline::sWaterReflections && LLDrawPoolWater::sNeedsReflectionUpdate)
{
+ //disable occlusion culling for reflection/refraction passes (save setting to restore later)
+ S32 occlude = LLPipeline::sUseOcclusion;
+ LLPipeline::sUseOcclusion = 0;
+
bool skip_avatar_update = false;
if (!isAgentAvatarValid() || gAgentCamera.getCameraAnimating() || gAgentCamera.getCameraMode() != CAMERA_MODE_MOUSELOOK || !LLVOAvatar::sVisibleInFirstPerson)
{
@@ -9408,6 +9412,9 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
}
LLViewerCamera::sCurCameraID = LLViewerCamera::CAMERA_WORLD;
+
+ // restore occlusion culling
+ LLPipeline::sUseOcclusion = occlude;
}
else
{
@@ -9515,7 +9522,7 @@ void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera
{
LL_RECORD_BLOCK_TIME(FTM_SHADOW_RENDER);
- //clip out geometry on the same side of water as the camera
+ //disable occlusion culling for shadow passes (save setting to restore later)
S32 occlude = LLPipeline::sUseOcclusion;
if (!use_occlusion)
{