summaryrefslogtreecommitdiff
path: root/indra/newview/llfetchedgltfmaterial.cpp
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2026-07-24 11:24:12 +0800
committerErik Kundiman <erik@megapahit.org>2026-07-24 11:24:12 +0800
commitfc46ce4c0c7d81349d55933fb4bef3260f79ac8b (patch)
tree42b81558404432b253684661136dcd38722f59a7 /indra/newview/llfetchedgltfmaterial.cpp
parentffd174763119879d8be376c7c94b58e1961a7ebd (diff)
parentbcfda3b68a95bbbfb8b53f6313929fc5aeaa591c (diff)
Merge tag 'Second_Life_Release#bcfda3b6-26.3' into 26.3
Diffstat (limited to 'indra/newview/llfetchedgltfmaterial.cpp')
-rw-r--r--indra/newview/llfetchedgltfmaterial.cpp29
1 files changed, 1 insertions, 28 deletions
diff --git a/indra/newview/llfetchedgltfmaterial.cpp b/indra/newview/llfetchedgltfmaterial.cpp
index d71f0c1bd4..a05f725673 100644
--- a/indra/newview/llfetchedgltfmaterial.cpp
+++ b/indra/newview/llfetchedgltfmaterial.cpp
@@ -73,20 +73,6 @@ void LLFetchedGLTFMaterial::bind(LLViewerTexture* media_tex)
LLViewerTexture* baseColorTex = media_tex ? media_tex : mBaseColorTexture;
LLViewerTexture* emissiveTex = media_tex ? media_tex : mEmissiveTexture;
- if (media_tex)
- {
- // Media hides these but they stay registered for coverage. Stamp them so
- // the GC doesn't coarsen/refetch them while the media is playing.
- if (mBaseColorTexture.notNull())
- {
- if (LLImageGL* gl_tex = mBaseColorTexture->getGLTexture()) { gl_tex->stampBound(); }
- }
- if (mEmissiveTexture.notNull())
- {
- if (LLImageGL* gl_tex = mEmissiveTexture->getGLTexture()) { gl_tex->stampBound(); }
- }
- }
-
if (!LLPipeline::sShadowRender || (mAlphaMode == LLGLTFMaterial::ALPHA_MODE_MASK))
{
if (mAlphaMode == LLGLTFMaterial::ALPHA_MODE_MASK)
@@ -111,26 +97,13 @@ void LLFetchedGLTFMaterial::bind(LLViewerTexture* media_tex)
if (!LLPipeline::sShadowRender)
{
- // Bind the normal map at whatever resolution is resident, like Blinn-Phong
- // (soft, never absent). Only fall back to the flat normal when it's not
- // loaded yet. (The old discard<=4 gate dropped distant/tiled PBR normals
- // entirely, making PBR look flatter than equivalent Blinn content.)
- if (mNormalTexture.notNull() && mNormalTexture->hasGLTexture())
+ if (mNormalTexture.notNull() && mNormalTexture->getDiscardLevel() <= 4)
{
shader->bindTexture(LLShaderMgr::BUMP_MAP, mNormalTexture);
}
else
{
shader->bindTexture(LLShaderMgr::BUMP_MAP, LLViewerFetchedTexture::sFlatNormalImagep);
- if (mNormalTexture.notNull())
- {
- // In use, just not loaded yet - stamp it so the GC doesn't treat
- // it as unseen and pin it deep before its first real bind.
- if (LLImageGL* gl_tex = mNormalTexture->getGLTexture())
- {
- gl_tex->stampBound();
- }
- }
}
if (mMetallicRoughnessTexture.notNull())