diff options
author | Rye Mutt <rye@alchemyviewer.org> | 2024-08-17 19:19:18 -0400 |
---|---|---|
committer | Rye Mutt <rye@alchemyviewer.org> | 2024-08-18 01:23:11 -0400 |
commit | 4e19b2ae34a0cd5e19068bedb8612ba4ea89e8c1 (patch) | |
tree | fea3e6f1c997ee5b664ac23891f3124b924b9217 /indra | |
parent | 94aec3d1e619372b0652d298ded4d2a7ac96d131 (diff) |
Fix RenderReflectionProbeResolution debug setting not updating during runtime
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llreflectionmapmanager.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/indra/newview/llreflectionmapmanager.cpp b/indra/newview/llreflectionmapmanager.cpp index 1efe51c1aa..3526004071 100644 --- a/indra/newview/llreflectionmapmanager.cpp +++ b/indra/newview/llreflectionmapmanager.cpp @@ -1371,13 +1371,21 @@ void LLReflectionMapManager::initReflectionMaps() { U32 count = LL_MAX_REFLECTION_PROBE_COUNT; - if (mTexture.isNull() || mReflectionProbeCount != count || mReset) + static LLCachedControl<U32> ref_probe_res(gSavedSettings, "RenderReflectionProbeResolution", 128U); + U32 probe_resolution = nhpo2(llclamp(ref_probe_res(), (U32)64, (U32)512)); + if (mTexture.isNull() || mReflectionProbeCount != count || mProbeResolution != probe_resolution || mReset) { + if(mProbeResolution != probe_resolution) + { + mRenderTarget.release(); + mMipChain.clear(); + } + gEXRImage = nullptr; mReset = false; mReflectionProbeCount = count; - mProbeResolution = nhpo2(llclamp(gSavedSettings.getU32("RenderReflectionProbeResolution"), (U32)64, (U32)512)); + mProbeResolution = probe_resolution; mMaxProbeLOD = log2f((F32)mProbeResolution) - 1.f; // number of mips - 1 if (mTexture.isNull() || |