diff options
author | RunitaiLinden <davep@lindenlab.com> | 2023-04-18 19:11:38 -0500 |
---|---|---|
committer | RunitaiLinden <davep@lindenlab.com> | 2023-04-18 19:11:38 -0500 |
commit | 37eee397b70e2a13a1309025207d1c301f7070c5 (patch) | |
tree | 8f223d6719ce6bb57726e81b514f60c7d7a89359 /indra/newview/llreflectionmap.cpp | |
parent | 04b6b84798c497582d8706368580eb3c3ce699eb (diff) |
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.
Diffstat (limited to 'indra/newview/llreflectionmap.cpp')
-rw-r--r-- | indra/newview/llreflectionmap.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
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<S32> 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; |