diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-01-08 23:38:28 +0200 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-01-08 23:38:28 +0200 |
commit | e2de27c84e20e2392ac4716d0bf7d0c0d7c0454f (patch) | |
tree | 97a90df09beddedfd28c8eb502effa7e40075e88 /indra/newview/llviewertexturelist.cpp | |
parent | e4a1feb83079965fbebd356aa694adf100fb7ee3 (diff) | |
parent | 77395eddc911e0801e50fd693f7bbaee8046aa95 (diff) |
Merge branch 'main' into DRTVWR-600-maint-A
# Conflicts:
# indra/newview/llmaterialeditor.cpp
Diffstat (limited to 'indra/newview/llviewertexturelist.cpp')
-rw-r--r-- | indra/newview/llviewertexturelist.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 7931b74b11..daf3a5a20f 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -899,6 +899,13 @@ void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imag { F32 vsize = face->getPixelArea(); + // scale desired texture resolution higher or lower depending on texture scale + const LLTextureEntry* te = face->getTextureEntry(); + F32 min_scale = te ? llmin(fabsf(te->getScaleS()), fabsf(te->getScaleT())) : 1.f; + min_scale = llmax(min_scale*min_scale, 0.1f); + + vsize /= min_scale; + #if LL_DARWIN vsize /= 1.f + LLViewerTexture::sDesiredDiscardBias*(1.f+face->getDrawable()->mDistanceWRTCamera*bias_distance_scale); #else @@ -916,7 +923,6 @@ void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imag // if a GLTF material is present, ignore that face // as far as this texture stats go, but update the GLTF material // stats - const LLTextureEntry* te = face->getTextureEntry(); LLFetchedGLTFMaterial* mat = te ? (LLFetchedGLTFMaterial*)te->getGLTFRenderMaterial() : nullptr; llassert(mat == nullptr || dynamic_cast<LLFetchedGLTFMaterial*>(te->getGLTFRenderMaterial()) != nullptr); if (mat) |