#3371 Texture resolution cap

master
Andrey Kleshchev 2025-01-13 17:54:02 +02:00 committed by Andrey Kleshchev
parent f490bf6463
commit c85880aca9
4 changed files with 76 additions and 11 deletions

View File

@ -85,6 +85,7 @@ RenderExposure 1 4
RenderTonemapType 1 1
RenderTonemapMix 1 1
RenderDisableVintageMode 1 1
RenderMaxTextureResolution 1 2048
//
// Low Graphics Settings
@ -126,6 +127,7 @@ RenderExposure 1 1
RenderTonemapType 1 1
RenderTonemapMix 1 0.7
RenderDisableVintageMode 1 0
RenderMaxTextureResolution 1 512
//
// Medium Low Graphics Settings
@ -167,6 +169,7 @@ RenderExposure 1 1
RenderTonemapType 1 1
RenderTonemapMix 1 0.7
RenderDisableVintageMode 1 0
RenderMaxTextureResolution 1 1024
//
// Medium Graphics Settings (standard)
@ -207,6 +210,7 @@ RenderCASSharpness 1 0
RenderExposure 1 1
RenderTonemapType 1 1
RenderTonemapMix 1 0.7
RenderMaxTextureResolution 1 2048
//
// Medium High Graphics Settings
@ -247,6 +251,7 @@ RenderCASSharpness 1 0
RenderExposure 1 1
RenderTonemapType 1 1
RenderTonemapMix 1 0.7
RenderMaxTextureResolution 1 2048
//
// High Graphics Settings (SSAO + sun shadows)
@ -287,6 +292,7 @@ RenderCASSharpness 1 0.4
RenderExposure 1 1
RenderTonemapType 1 1
RenderTonemapMix 1 0.7
RenderMaxTextureResolution 1 2048
//
// High Ultra Graphics Settings (deferred + SSAO + all shadows)
@ -327,6 +333,7 @@ RenderCASSharpness 1 0.4
RenderExposure 1 1
RenderTonemapType 1 1
RenderTonemapMix 1 0.7
RenderMaxTextureResolution 1 2048
//
// Ultra graphics (REALLY PURTY!)
@ -367,6 +374,7 @@ RenderCASSharpness 1 0.4
RenderExposure 1 1
RenderTonemapType 1 1
RenderTonemapMix 1 0.7
RenderMaxTextureResolution 1 2048
//
// Class Unknown Hardware (unknown)
@ -399,6 +407,7 @@ RenderShadowDetail 0 0
RenderReflectionProbeDetail 0 -1
RenderMirrors 0 0
RenderDisableVintageMode 1 0
RenderMaxTextureResolution 1 2048
list Intel
RenderAnisotropic 1 0

View File

@ -85,6 +85,7 @@ RenderTonemapType 1 1
RenderTonemapMix 1 1
RenderDisableVintageMode 1 1
RenderDownScaleMethod 1 0
RenderMaxTextureResolution 1 2048
//
// Low Graphics Settings
@ -126,6 +127,7 @@ RenderExposure 1 1
RenderTonemapType 1 1
RenderTonemapMix 1 0.7
RenderDisableVintageMode 1 0
RenderMaxTextureResolution 1 512
//
// Medium Low Graphics Settings
@ -167,6 +169,7 @@ RenderExposure 1 1
RenderTonemapType 1 1
RenderTonemapMix 1 0.7
RenderDisableVintageMode 1 0
RenderMaxTextureResolution 1 1024
//
// Medium Graphics Settings (standard)
@ -207,6 +210,7 @@ RenderCASSharpness 1 0
RenderExposure 1 1
RenderTonemapType 1 1
RenderTonemapMix 1 0.7
RenderMaxTextureResolution 1 2048
//
// Medium High Graphics Settings
@ -247,6 +251,7 @@ RenderCASSharpness 1 0
RenderExposure 1 1
RenderTonemapType 1 1
RenderTonemapMix 1 0.7
RenderMaxTextureResolution 1 2048
//
// High Graphics Settings (SSAO + sun shadows)
@ -287,6 +292,7 @@ RenderCASSharpness 1 0
RenderExposure 1 1
RenderTonemapType 1 1
RenderTonemapMix 1 0.7
RenderMaxTextureResolution 1 2048
//
// High Ultra Graphics Settings (SSAO + all shadows)
@ -327,6 +333,7 @@ RenderCASSharpness 1 0.4
RenderExposure 1 1
RenderTonemapType 1 1
RenderTonemapMix 1 0.7
RenderMaxTextureResolution 1 2048
//
// Ultra graphics (REALLY PURTY!)
@ -367,6 +374,7 @@ RenderCASSharpness 1 0.4
RenderExposure 1 1
RenderTonemapType 1 1
RenderTonemapMix 1 0.7
RenderMaxTextureResolution 1 2048
//
// Class Unknown Hardware (unknown)
@ -398,6 +406,7 @@ RenderDeferredSSAO 0 0
RenderShadowDetail 0 0
RenderMirrors 0 0
RenderDisableVintageMode 1 0
RenderMaxTextureResolution 1 2048
list TexUnit8orLess
RenderDeferredSSAO 0 0

View File

@ -1694,6 +1694,16 @@ void LLViewerFetchedTexture::processTextureStats()
static LLCachedControl<bool> textures_fullres(gSavedSettings,"TextureLoadFullRes", false);
if (mBoostLevel < LLGLTexture::BOOST_HIGH)
{
// restrict texture resolution to download based on RenderMaxTextureResolution
static LLCachedControl<U32> max_texture_resolution(gSavedSettings, "RenderMaxTextureResolution", 2048);
// sanity clamp debug setting to avoid settings hack shenanigans
F32 tex_res = (F32)llclamp((S32)max_texture_resolution, 512, MAX_IMAGE_SIZE_DEFAULT);
tex_res *= tex_res;
mMaxVirtualSize = llmin(mMaxVirtualSize, tex_res);
}
if (textures_fullres)
{
mDesiredDiscardLevel = 0;
@ -2948,10 +2958,12 @@ void LLViewerLODTexture::processTextureStats()
static LLCachedControl<bool> textures_fullres(gSavedSettings,"TextureLoadFullRes", false);
{ // restrict texture resolution to download based on RenderMaxTextureResolution
if (mBoostLevel < LLGLTexture::BOOST_HIGH)
{
// restrict texture resolution to download based on RenderMaxTextureResolution
static LLCachedControl<U32> max_texture_resolution(gSavedSettings, "RenderMaxTextureResolution", 2048);
// sanity clamp debug setting to avoid settings hack shenanigans
F32 tex_res = (F32)llclamp((S32)max_texture_resolution, 512, 2048);
F32 tex_res = (F32)llclamp((S32)max_texture_resolution, 512, MAX_IMAGE_SIZE_DEFAULT);
tex_res *= tex_res;
mMaxVirtualSize = llmin(mMaxVirtualSize, tex_res);
}

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater
height="430"
height="452"
layout="topleft"
name="prefs_graphics_advanced"
help_topic="Preferences_Graphics_Advanced"
@ -118,6 +118,41 @@
name="MaxLights"
top_delta="16"
width="336" />
<text
type="string"
length="1"
follows="left|top"
height="16"
layout="topleft"
top_delta="16"
left="30"
width="130"
name="MaxTextureResolutionLabel"
text_readonly_color="LabelDisabledColor">
Maximum LOD resolution:
</text>
<combo_box
control_name="RenderMaxTextureResolution"
height="19"
layout="topleft"
left_pad="40"
top_delta="0"
name="MaxTextureResolution"
tool_tip="Maximum resolution for 'level of detail' textures"
width="90">
<combo_box.item
label="512"
name="512"
value="512"/>
<combo_box.item
label="1024"
name="1024"
value="1024"/>
<combo_box.item
label="2048"
name="2048"
value="2048"/>
</combo_box>
<check_box
control_name="RenderVSyncEnable"
@ -152,7 +187,7 @@
layout="topleft"
left="30"
top_delta="16"
width="128"
width="130"
name="AvatarComplexityModeLabel"
text_readonly_color="LabelDisabledColor">
Avatar display:
@ -160,10 +195,10 @@
<combo_box
control_name="RenderAvatarComplexityMode"
height="18"
height="19"
layout="topleft"
left_delta="130"
top_delta="0"
left_pad="40"
top_delta="-1"
name="AvatarComplexityMode"
width="150">
<combo_box.item
@ -195,7 +230,7 @@
max_val="101"
name="IndirectMaxComplexity"
show_text="false"
top_delta="16"
top_delta="19"
width="300">
<slider.commit_callback
function="Pref.UpdateIndirectMaxComplexity"
@ -368,7 +403,7 @@
left="30"
name="antialiasing label"
top_delta="20"
width="120">
width="130">
Antialiasing:
</text>
<combo_box
@ -403,7 +438,7 @@
left="30"
name="antialiasing quality label"
top_delta="20"
width="120">
width="130">
Antialiasing Quality:
</text>
<combo_box
@ -1015,7 +1050,7 @@
layout="topleft"
left="13"
name="horiz_border"
top="393"
top="415"
top_delta="5"
width="774"/>
<button