summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2019-01-29 09:40:24 -0800
committerGraham Linden <graham@lindenlab.com>2019-01-29 09:40:24 -0800
commit5748a1f6390439b428cbab1a99ce0cbbf48fa145 (patch)
treeeb6cf2e5eeddc6cb2a1d221eac21474032be1727 /indra/newview
parent8cb026377e1f790ba333870e2d613e0b55a4311c (diff)
SL-10424
Ignore occlusion culling when rendering distortion map.
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/pipeline.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 9b89af20d2..0784f3acdd 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -9459,12 +9459,14 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
water_clip = -1;
}
+ S32 occlusion = LLPipeline::sUseOcclusion;
+
+ LLPipeline::sUseOcclusion = 0;
+
if (!LLViewerCamera::getInstance()->cameraUnderWater())
{ //generate planar reflection map
//disable occlusion culling for reflection map for now
- S32 occlusion = LLPipeline::sUseOcclusion;
-
- LLPipeline::sUseOcclusion = 0;
+
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
glClearColor(0,0,0,0);
@@ -9603,8 +9605,7 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
gGL.matrixMode(LLRender::MM_MODELVIEW);
gGL.popMatrix();
mWaterRef.flush();
- set_current_modelview(current);
- LLPipeline::sUseOcclusion = occlusion;
+ set_current_modelview(current);
}
camera.setOrigin(camera_in.getOrigin());
@@ -9708,6 +9709,8 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
}
last_update = LLDrawPoolWater::sNeedsReflectionUpdate && LLDrawPoolWater::sNeedsDistortionUpdate;
+ LLPipeline::sUseOcclusion = occlusion;
+
LLPipeline::sUnderWaterRender = false;
LLPipeline::sReflectionRender = false;