diff options
| author | Jonathan "Geenz" Goodman <geenz@geenzo.com> | 2026-05-14 22:36:43 -0400 |
|---|---|---|
| committer | Jonathan "Geenz" Goodman <geenz@geenzo.com> | 2026-05-14 22:36:43 -0400 |
| commit | 97f8dfaca2a60e228b84aedbf71620f0c000412c (patch) | |
| tree | acc778797233fae9f97d48367baa434ba3fea085 /indra/newview/llviewertexture.cpp | |
| parent | 82db4943e011fc65e9a0b87990abb49b898a7782 (diff) | |
Add a background discard offset.
Diffstat (limited to 'indra/newview/llviewertexture.cpp')
| -rw-r--r-- | indra/newview/llviewertexture.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 79439b4d58..1e8951926e 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -3204,7 +3204,16 @@ void LLViewerLODTexture::processTextureStats() combined = llmax(combined, mStalenessFactor); if (!isAgentAvatarBoost(mBoostLevel)) { - combined = llmax(combined, sBackgroundFactor); + // Background floor capped at (dim_max - offset) so we can + // keep some baseline quality while backgrounded. + static LLCachedControl<S32> bg_offset(gSavedSettings, "TextureBackgroundDiscardOffset", 2); + F32 bg = sBackgroundFactor; + if ((S32)bg_offset > 0 && dim_max_for_image > 0.f) + { + F32 cap = llmax(dim_max_for_image - (F32)(S32)bg_offset, 0.f) / dim_max_for_image; + bg = llmin(bg, cap); + } + combined = llmax(combined, bg); } // VRAM pressure: pow(combined, 1 - factor) bends the curve |
