diff options
| author | Graham Linden <graham@lindenlab.com> | 2019-03-05 09:35:04 -0800 |
|---|---|---|
| committer | Graham Linden <graham@lindenlab.com> | 2019-03-05 09:35:04 -0800 |
| commit | 3396b728d2167c41a6ce4a6ba9dfa1fc13db2333 (patch) | |
| tree | 90aa6bc40ab52181979efd5ed5f19d75da3063eb /indra/newview/pipeline.cpp | |
| parent | f3303654a5ded57fab73e8303a508ecf13cf4651 (diff) | |
Don't rebuild reflection when only edge water patches are in play.
Use (Restore)TexSetup for tex binding (should be equivalent now).
Simplify uniform management in alpha drawpool loop.
Fix wrong modelview mat being used for distortion map gen.
Diffstat (limited to 'indra/newview/pipeline.cpp')
| -rw-r--r-- | indra/newview/pipeline.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 99235509c9..89e6ddb69c 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -9334,6 +9334,8 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in) //disable occlusion culling for reflection map for now LLPipeline::sUseOcclusion = 0; + glh::matrix4f current = get_current_modelview(); + if (!LLViewerCamera::getInstance()->cameraUnderWater()) { //generate planar reflection map @@ -9342,8 +9344,6 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in) gGL.matrixMode(LLRender::MM_MODELVIEW); gGL.pushMatrix(); - glh::matrix4f current = get_current_modelview(); - glh::matrix4f mat; camera.getOpenGLTransform(mat.m); @@ -9415,7 +9415,7 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in) } } - LLGLUserClipPlane clip_plane(plane, mat, projection); + LLGLUserClipPlane clip_plane(plane, mReflectionModelView, projection); LLGLDisable cull(GL_CULL_FACE); updateCull(camera, mReflectedObjects, -water_clip, &plane); stateSort(camera, mReflectedObjects); @@ -9481,7 +9481,7 @@ 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_height * LLPipeline::sDistortionWaterClipPlaneMargin); - LLGLUserClipPlane clip_plane(plane, mReflectionModelView, projection); + LLGLUserClipPlane clip_plane(plane, current, projection); gGL.setColorMask(true, true); mWaterDis.clear(); |
