diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2021-09-23 22:38:30 +0300 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2021-11-19 14:43:20 -0500 |
commit | 176b2acdacd2703eea15584f8e763abfc50f6266 (patch) | |
tree | 60a77530a1a78f851fe400b122ffa9049b80968e /indra | |
parent | 1acd92c30c88a9718385f29a558b77bd20588764 (diff) |
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.
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/pipeline.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
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); |