diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2021-09-23 22:38:30 +0300 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2021-11-12 17:35:28 +0200 |
commit | 819088563e13f1d75e048311fbaf0df4a79b7e19 (patch) | |
tree | 9089618ac847896852b8929c464a2459c447b3d8 /indra/newview | |
parent | 709184e0ffdd9967444c07bd52d479be4d932835 (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/newview')
-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); |