diff options
author | RunitaiLinden <davep@lindenlab.com> | 2023-12-08 12:36:55 -0600 |
---|---|---|
committer | RunitaiLinden <davep@lindenlab.com> | 2023-12-08 12:36:55 -0600 |
commit | 2c2d60bbc36c58314d36770349c2f904c848e582 (patch) | |
tree | bb520f5befb914a39a806fd7fd298a668b0c7975 | |
parent | 5e8b0fb646791bb1f914b0d279042910b710c8ef (diff) |
SL-20674 Fix for textures ignoring texture scale when determining what resolution to be.
-rw-r--r-- | indra/newview/llviewertexture.cpp | 3 | ||||
-rw-r--r-- | indra/newview/llviewertexturelist.cpp | 8 |
2 files changed, 7 insertions, 4 deletions
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index ec6f2c848f..56bba51692 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -2124,9 +2124,6 @@ bool LLViewerFetchedTexture::updateFetch() } } - llassert(mRawImage.notNull() || !mIsRawImageValid); - llassert(mRawImage.notNull() || !mNeedsCreateTexture); - return mIsFetching ? true : false; } diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index f898fb7142..9a6d40ab0a 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) |