summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2019-01-18 22:07:34 +0000
committerRider Linden <rider@lindenlab.com>2019-01-18 22:07:34 +0000
commit296dbb9fd08c3c6e25c4f174159b77d470456a8f (patch)
tree8204043fa345650a3e79dbaa8c14021cfcfe1456
parentc00e7dbae16bee6e09843d3b2c3ed01f22bae989 (diff)
parentd070c56f640768bb73933f9cbd31bab67d26b6e9 (diff)
Merged in graham_linden/viewer-eep-fixes (pull request #231)
SL-10384
-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;