summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2019-05-06 11:11:03 -0700
committerGraham Linden <graham@lindenlab.com>2019-05-06 11:11:03 -0700
commit161d9993a59b4484777f7115a3ffd1b8e32ff7c4 (patch)
treeed57cdd59e0987afd370e5fa409eb1667cf1e778
parent21c1941a4f4780c0675ae338cbbc5899aa7c0613 (diff)
SL-10946
Tweak DistortionWaterClipPlaneMargin (1.0001 -> 1.0125) to mask edges of objects in water disortion map.
-rw-r--r--indra/newview/pipeline.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index f1a75f1277..3277a6ed32 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -349,7 +349,7 @@ bool LLPipeline::sMemAllocationThrottled = false;
S32 LLPipeline::sVisibleLightCount = 0;
F32 LLPipeline::sMinRenderSize = 0.f;
bool LLPipeline::sRenderingHUDs;
-F32 LLPipeline::sDistortionWaterClipPlaneMargin = 1.0001f;
+F32 LLPipeline::sDistortionWaterClipPlaneMargin = 1.0125f;
// EventHost API LLPipeline listener.
static LLPipelineListener sPipelineListener;
@@ -9410,9 +9410,11 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
mWaterDis.bindTarget();
mWaterDis.getViewport(gGLViewport);
+ F32 water_dist = water_height * LLPipeline::sDistortionWaterClipPlaneMargin;
+
//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);
+ LLPlane plane(-pnorm, water_dist);
LLGLUserClipPlane clip_plane(plane, current, projection);