summaryrefslogtreecommitdiff
path: root/indra/newview/llviewercontrol.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewercontrol.cpp')
-rw-r--r--indra/newview/llviewercontrol.cpp21
1 files changed, 13 insertions, 8 deletions
diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp
index d4d07f24ea..3a6e4e2e2d 100644
--- a/indra/newview/llviewercontrol.cpp
+++ b/indra/newview/llviewercontrol.cpp
@@ -114,32 +114,37 @@ static bool handleRenderAvatarMouselookChanged(const LLSD& newvalue)
static bool handleRenderTextureQualityChanged(const LLSD& newvalue)
{
- // 0=Low, 1=Medium, 2=High, 3=Ultra. Drives max-resolution and per-channel
- // streaming aggressiveness. Channel order is X=normals, Y=diffuse,
- // Z=specular/metallic, W=emissive (matches TextureChannelPriority).
+ // 0=Low, 1=Medium, 2=High, 3=Ultra. Drives max-resolution and the
+ // per-channel TextureChannelPriority + TextureDistanceDiscardPower
+ // exponents. Channel order: X=normals, Y=diffuse, Z=spec, W=emissive.
U32 quality = (U32)newvalue.asInteger();
U32 max_res = 2048;
- LLVector4 channel_priority(5.f, 7.5f, 20.f, 7.5f);
+ LLVector4 channel_priority(1.f, 0.75f, 0.5f, 0.75f);
+ F32 distance_power = 0.5f;
switch (quality)
{
case 0: // Low
max_res = 1024;
- channel_priority.setVec(20.f, 30.f, 80.f, 30.f);
+ channel_priority.setVec(0.5f, 0.75f, 0.1f, 0.5f);
+ distance_power = 0.15f;
break;
case 1: // Medium
- channel_priority.setVec(10.f, 15.f, 40.f, 15.f);
+ channel_priority.setVec(0.75f, 0.75f, 0.3f, 0.75f);
+ distance_power = 0.25f;
break;
case 2: // High
- // defaults above
+ // channel defaults above (1, 0.75, 0.5, 0.75)
+ distance_power = 0.35f;
break;
case 3: // Ultra
default:
- if (quality > 3) quality = 3;
channel_priority.setVec(1.f, 1.f, 1.f, 1.f);
+ distance_power = 0.5f;
break;
}
gSavedSettings.setU32("RenderMaxTextureResolution", max_res);
gSavedSettings.setVector4("TextureChannelPriority", channel_priority);
+ gSavedSettings.setF32("TextureDistanceDiscardPower", distance_power);
return true;
}