summaryrefslogtreecommitdiff
path: root/indra/newview/llfetchedgltfmaterial.cpp
diff options
context:
space:
mode:
authorJonathan "Geenz" Goodman <geenz@geenzo.com>2026-07-07 04:59:59 -0400
committerJonathan "Geenz" Goodman <geenz@geenzo.com>2026-07-07 04:59:59 -0400
commit6622a5694b5ccd1da77e1564c6475eaf81095f5b (patch)
tree3e2e3242a3f0d81843972e253e219a3208ba325d /indra/newview/llfetchedgltfmaterial.cpp
parent3e756b57f42e61f6aad3991c7bfa0a581c894244 (diff)
Get some more wins for overall downrezzing and minimizing thrashing.
Also make sure that probes don't stamp - that creates thrashing when distant probes render. We're at a low enough resolution on those things that higher mips are likely to go unnoticed, and we bake them frequently enough that we can pick up lower mips when we actually need them.
Diffstat (limited to 'indra/newview/llfetchedgltfmaterial.cpp')
-rw-r--r--indra/newview/llfetchedgltfmaterial.cpp26
1 files changed, 8 insertions, 18 deletions
diff --git a/indra/newview/llfetchedgltfmaterial.cpp b/indra/newview/llfetchedgltfmaterial.cpp
index 306067d2cf..d71f0c1bd4 100644
--- a/indra/newview/llfetchedgltfmaterial.cpp
+++ b/indra/newview/llfetchedgltfmaterial.cpp
@@ -75,11 +75,8 @@ void LLFetchedGLTFMaterial::bind(LLViewerTexture* media_tex)
if (media_tex)
{
- // The real basecolor/emissive stay registered for coverage while
- // media hides them - stamp them so the streaming cooldown doesn't
- // fight that coverage (coarsen -> refetch tug-of-war) the whole
- // time media is playing. Blinn has no hidden-texture-under-media
- // state, so without this the two systems diverge on media faces.
+ // 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(); }
@@ -114,15 +111,10 @@ void LLFetchedGLTFMaterial::bind(LLViewerTexture* media_tex)
if (!LLPipeline::sShadowRender)
{
- // Bind the normal map at whatever resolution is resident - matching
- // how Blinn-Phong normal maps degrade (soft, never absent). The old
- // "getDiscardLevel() <= 4" gate made PBR normals a cliff instead of
- // a gradient: any material the streamer legitimately sized past
- // discard 4 (distant / tiled) rendered with NO normal map while the
- // equivalent Blinn content rendered a soft one, making PBR look
- // categorically flatter. The flat-normal fallback remains only for
- // the genuinely-not-yet-loaded window, where it is the correct
- // normal-shaped default.
+ // 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())
{
shader->bindTexture(LLShaderMgr::BUMP_MAP, mNormalTexture);
@@ -132,10 +124,8 @@ void LLFetchedGLTFMaterial::bind(LLViewerTexture* media_tex)
shader->bindTexture(LLShaderMgr::BUMP_MAP, LLViewerFetchedTexture::sFlatNormalImagep);
if (mNormalTexture.notNull())
{
- // In active use, just not loaded yet - stamp it so the
- // streaming last-bound cooldown doesn't read "unbound" as
- // "unseen" and pin it at the deepest mip before its first
- // real bind.
+ // 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();