From c15baecbfbc9baffdeb6ec53b7e4090470514657 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Mon, 10 Jun 2019 14:54:47 -0700 Subject: SL-11370 Modify culling logic to exclude objects correctly in < Mid graphics. --- indra/newview/app_settings/mid_graphics.xml | 2 +- .../shaders/class1/deferred/waterF.glsl | 2 +- indra/newview/pipeline.cpp | 25 ++++++++++++++++------ 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/indra/newview/app_settings/mid_graphics.xml b/indra/newview/app_settings/mid_graphics.xml index a10c02b79f..f989fe7381 100644 --- a/indra/newview/app_settings/mid_graphics.xml +++ b/indra/newview/app_settings/mid_graphics.xml @@ -19,7 +19,7 @@ - + diff --git a/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl b/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl index 2235ab12a4..a9161b2a20 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl @@ -153,7 +153,7 @@ void main() spec = pow(spec, 128.0); //figure out distortion vector (ripply) - vec2 distort2 = distort+wavef.xy*refScale/max(dmod*df1, 1.0); + vec2 distort2 = distort+wavef.xy*(refScale * 0.01)/max(dmod*df1, 1.0); vec4 fb = texture2D(screenTex, distort2); diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 7e819c0a52..d4c25a4ebc 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -9360,8 +9360,6 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in) updateCull(camera, mSky); stateSort(camera, mSky); - gPipeline.grabReferences(mSky); - renderGeom(camera, TRUE); gPipeline.popRenderTypeMask(); @@ -9395,7 +9393,6 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in) LLGLDisable cull(GL_CULL_FACE); updateCull(camera, mReflectedObjects, -water_clip, &plane); stateSort(camera, mReflectedObjects); - gPipeline.grabReferences(mReflectedObjects); renderGeom(camera); } @@ -9472,11 +9469,25 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in) clip_plane.disable(); } - updateCull(camera, mRefractedObjects, water_clip, &plane); - stateSort(camera, mRefractedObjects); - gPipeline.grabReferences(mRefractedObjects); + if (detail > 0) + { + if (detail < 4) + { + clearRenderTypeMask(LLPipeline::RENDER_TYPE_PARTICLES, END_RENDER_TYPES); + if (detail < 3) + { + clearRenderTypeMask(LLPipeline::RENDER_TYPE_AVATAR, END_RENDER_TYPES); + if (detail < 2) + { + clearRenderTypeMask(LLPipeline::RENDER_TYPE_VOLUME, END_RENDER_TYPES); + } + } + } - renderGeom(camera); + updateCull(camera, mRefractedObjects, water_clip, &plane); + stateSort(camera, mRefractedObjects); + renderGeom(camera); + } if (LLGLSLShader::sNoFixedFunction) { -- cgit v1.2.3