From 176b2acdacd2703eea15584f8e763abfc50f6266 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 23 Sep 2021 22:38:30 +0300 Subject: SL-11678 Avatar is reflecting on the under side of water surface Avatar wasn't reflecting but distorting, since avatar was already under water it looked like a 'reflection' of avatar, but was not rotated right and with wrong angle. --- indra/newview/pipeline.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'indra') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 586e5b7c2d..de95eb1a87 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -9428,19 +9428,13 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in) //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_dist); + LLPlane plane(-pnorm, camera_is_underwater ? -water_height : water_dist); LLGLUserClipPlane clip_plane(plane, saved_modelview, saved_projection); gGL.setColorMask(true, true); mWaterDis.clear(); gGL.setColorMask(true, false); - // ignore clip plane if we're underwater and viewing distortion map of objects above waterline - if (camera_is_underwater) - { - clip_plane.disable(); - } - if (reflection_detail >= WATER_REFLECT_NONE_WATER_TRANSPARENT) { updateCull(camera, mRefractedObjects, water_clip, &plane); -- cgit v1.2.3