From 37eee397b70e2a13a1309025207d1c301f7070c5 Mon Sep 17 00:00:00 2001 From: RunitaiLinden Date: Tue, 18 Apr 2023 19:11:38 -0500 Subject: DRTVWR-559 Add control for automatic reflection probes to advanced preferences and featuretable. Remove Reflections checkbox. Don't persist reflection probe volume display between sessions. Incidental decruft. --- indra/newview/llreflectionmap.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'indra/newview/llreflectionmap.cpp') diff --git a/indra/newview/llreflectionmap.cpp b/indra/newview/llreflectionmap.cpp index 624fbd1758..72dab0cba8 100644 --- a/indra/newview/llreflectionmap.cpp +++ b/indra/newview/llreflectionmap.cpp @@ -263,6 +263,30 @@ bool LLReflectionMap::isActive() return mCubeIndex != -1; } +bool LLReflectionMap::isRelevant() +{ + static LLCachedControl RenderReflectionProbeLevel(gSavedSettings, "RenderReflectionProbeLevel", 3); + + if (mViewerObject && RenderReflectionProbeLevel > 0) + { // not an automatic probe + return true; + } + + if (RenderReflectionProbeLevel == 3) + { // all automatics are relevant + return true; + } + + if (RenderReflectionProbeLevel == 2) + { // terrain and water only, ignore probes that have a group + return !mGroup; + } + + // no automatic probes, yes manual probes + return mViewerObject != nullptr; +} + + void LLReflectionMap::doOcclusion(const LLVector4a& eye) { LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE; -- cgit v1.2.3