summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2021-09-23 22:38:30 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2021-09-23 22:39:19 +0300
commit53c0144dd272470172591b967a84beaa4019b728 (patch)
tree24fb594fef9a32e417f9a1c9198ff47b08d269d8
parent921c3f5f69c90b5924d2f4bbbd32455f8c9c8173 (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.
-rw-r--r--indra/newview/pipeline.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 391d2472a6..c417b55108 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -9491,19 +9491,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);