From 55e94847b4270d7f71016fe651800ef9e43b4bc5 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Geenz\" Goodman" Date: Wed, 22 Jul 2026 00:40:35 -0400 Subject: Revert "Merge pull request #5829 from secondlife/geenz/texture-quality" This reverts commit 6b4e3f3288ec1e9917cecd862a7a52945e5b4db2, reversing changes made to 99ab6316b4ae9058f22d9f57d21e795ca45797fd. --- indra/newview/llvlcomposition.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'indra/newview/llvlcomposition.cpp') diff --git a/indra/newview/llvlcomposition.cpp b/indra/newview/llvlcomposition.cpp index eb0261b5e5..3441e25c6a 100644 --- a/indra/newview/llvlcomposition.cpp +++ b/indra/newview/llvlcomposition.cpp @@ -173,10 +173,7 @@ LLPointer fetch_terrain_texture(const LLUUID& id) return nullptr; } - // LOD_TEXTURE so streaming math runs (the base-class processTextureStats - // pins mDesiredDiscardLevel at 0). - LLPointer tex = LLViewerTextureManager::getFetchedTexture( - id, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); + LLPointer tex = LLViewerTextureManager::getFetchedTexture(id); return tex; } @@ -346,9 +343,18 @@ bool LLTerrainMaterials::makeTextureReady(LLPointer& tex { if (boost) { - // Quality is driven by the streaming math via synthetic signals - // for BOOST_TERRAIN textures in updateImageDecodePriority. boost_minimap_texture(tex, BASE_SIZE*BASE_SIZE); + + S32 width = tex->getFullWidth(); + S32 height = tex->getFullHeight(); + S32 min_dim = llmin(width, height); + S32 ddiscard = 0; + while (min_dim > BASE_SIZE && ddiscard < MAX_DISCARD_LEVEL) + { + ddiscard++; + min_dim /= 2; + } + tex->setMinDiscardLevel(ddiscard); } return false; } -- cgit v1.3