summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorCosmic Linden <cosmic@lindenlab.com>2024-01-31 17:03:28 -0800
committerCosmic Linden <cosmic@lindenlab.com>2024-02-07 10:17:54 -0800
commit78f7423bcd1d0980a1e99cfa92b620dc74063169 (patch)
tree839ffc785cdaa8630088872f3a4db3cc7e9a590e /indra/newview
parente38a64601862feaff7089f3826de78b591ba4b96 (diff)
secondlife/viewer#711: More thoroughly clamp terrain PBR detail
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llviewershadermgr.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index 7e49ea3b7c..7149dc781f 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -640,6 +640,7 @@ std::string LLViewerShaderMgr::loadBasicShaders()
const F32 triplanar_factor = gSavedSettings.getF32("RenderTerrainPBRTriplanarBlendFactor");
attribs["TERRAIN_TRIPLANAR_BLEND_FACTOR"] = llformat("%.2f", triplanar_factor);
S32 detail = gSavedSettings.getS32("RenderTerrainPBRDetail");
+ detail = llclamp(detail, TERRAIN_PBR_DETAIL_MIN, TERRAIN_PBR_DETAIL_MAX);
attribs["TERRAIN_PBR_DETAIL"] = llformat("%d", detail);
}