From f2d35e8e568278f9269da11a5d589fc39f59f296 Mon Sep 17 00:00:00 2001 From: andreykproductengine <andreykproductengine@lindenlab.com> Date: Tue, 17 Sep 2019 15:56:07 +0300 Subject: [PATCH] SL-11779 Resolved perfomance drop with negative RenderShadowResolutionScale --- indra/newview/app_settings/settings.xml | 2 +- indra/newview/pipeline.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index b9cb613b969..68e39899f0b 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -9287,7 +9287,7 @@ <key>RenderShadowResolutionScale</key> <map> <key>Comment</key> - <string>Scale of shadow map resolution vs. screen resolution</string> + <string>Scale of shadow map resolution vs. screen resolution (only positivie values are allowed)</string> <key>Persist</key> <integer>1</integer> <key>Type</key> diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 65438ef05d3..eb2d3bf8737 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -973,7 +973,7 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples) mDeferredLight.release(); } - F32 scale = RenderShadowResolutionScale; + F32 scale = llmax(0.f, RenderShadowResolutionScale); if (shadow_detail > 0) { //allocate 4 sun shadow maps -- GitLab