From 161d9993a59b4484777f7115a3ffd1b8e32ff7c4 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Mon, 6 May 2019 11:11:03 -0700 Subject: SL-10946 Tweak DistortionWaterClipPlaneMargin (1.0001 -> 1.0125) to mask edges of objects in water disortion map. --- indra/newview/pipeline.cpp | 6 ++++-- 1 file 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); -- cgit v1.2.3