summaryrefslogtreecommitdiff
path: root/indra/newview/llviewertexture.cpp
diff options
context:
space:
mode:
authorJonathan "Geenz" Goodman <geenz@geenzo.com>2026-05-18 13:40:59 -0400
committerJonathan "Geenz" Goodman <geenz@geenzo.com>2026-05-18 13:40:59 -0400
commit1b1f59c1e21581c4c1968b9206b9d9c0dc8513a1 (patch)
treee86d63fdd61d96a416a7e89cae30142291b8cbd8 /indra/newview/llviewertexture.cpp
parent97bcc7816d7084b4aaed67cdb90a5b7ae0ec1126 (diff)
Break out texture channel priorities.
Diffstat (limited to 'indra/newview/llviewertexture.cpp')
-rw-r--r--indra/newview/llviewertexture.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 1e8951926e..727c0510f6 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -3180,10 +3180,19 @@ void LLViewerLODTexture::processTextureStats()
// Per-channel exponent. 1.0 = baseline; <1.0 pushes combined
// toward 1 (max attenuation) faster. Edges are preserved:
// pow(0, p) = 0, pow(1, p) = 1.
+ // mPriorityChannel order: 0=Normal, 1=BaseColor, 2=Specular, 3=Emissive.
S32 priority_channel = (mPriorityChannel >= 0 && mPriorityChannel < 4) ? (S32)mPriorityChannel : 1;
- static LLCachedControl<LLVector4> channel_priority(gSavedSettings, "TextureChannelPriority",
- LLVector4(1.f, 1.f, 1.f, 1.f));
- F32 channel_power = llmax(channel_priority().mV[priority_channel], 0.0001f);
+ static LLCachedControl<F32> channel_normal (gSavedSettings, "TextureChannelNormal", 1.0f);
+ static LLCachedControl<F32> channel_basecolor(gSavedSettings, "TextureChannelBaseColor", 0.75f);
+ static LLCachedControl<F32> channel_specular (gSavedSettings, "TextureChannelSpecular", 0.5f);
+ static LLCachedControl<F32> channel_emissive (gSavedSettings, "TextureChannelEmissive", 0.75f);
+ const F32 channels[4] = {
+ (F32)channel_normal,
+ (F32)channel_basecolor,
+ (F32)channel_specular,
+ (F32)channel_emissive,
+ };
+ F32 channel_power = llmax(channels[priority_channel], 0.0001f);
if (channel_power != 1.f)
{
combined = powf(combined, channel_power);