summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/pipeline.cpp7
-rw-r--r--indra/newview/pipeline.h1
2 files changed, 6 insertions, 2 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 5d9c4d64cb..9d8f98688f 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -349,6 +349,7 @@ bool LLPipeline::sMemAllocationThrottled = false;
S32 LLPipeline::sVisibleLightCount = 0;
F32 LLPipeline::sMinRenderSize = 0.f;
bool LLPipeline::sRenderingHUDs;
+F32 LLPipeline::sDistortionWaterClipPlaneMargin = 1.0001f;
// EventHost API LLPipeline listener.
static LLPipelineListener sPipelineListener;
@@ -9649,8 +9650,10 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
if (LLPipeline::sUnderWaterRender || LLDrawPoolWater::sNeedsReflectionUpdate)
{
- //clip out geometry on the same side of water as the camera
- LLPlane plane(pnorm, water_height);
+ //clip out geometry on the same side of water as the camera w/ enough margin to not include the water geo itself,
+ // but not so much as to clip out parts of avatars that should be seen under the water in the distortion map
+
+ LLPlane plane(pnorm, -water_height * LLPipeline::sDistortionWaterClipPlaneMargin);
LLGLUserClipPlane clip_plane(plane, mReflectionModelView, projection);
static LLCullResult result;
diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h
index c76b91266e..5be6b73cc4 100644
--- a/indra/newview/pipeline.h
+++ b/indra/newview/pipeline.h
@@ -594,6 +594,7 @@ public:
static S32 sVisibleLightCount;
static F32 sMinRenderSize;
static bool sRenderingHUDs;
+ static F32 sDistortionWaterClipPlaneMargin;
static LLTrace::EventStatHandle<S64> sStatBatchSize;