r.Streaming.MaxEffectiveScreenSize
r.Streaming.MaxEffectiveScreenSize
#Overview
name: r.Streaming.MaxEffectiveScreenSize
The value of this variable can be defined or overridden in .ini config files. 5
.ini config files referencing this setting variable.
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
0: Use current actual vertical screen size\n> 0: Clamp wanted mip size calculation to this value for the vertical screen size component.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.Streaming.MaxEffectiveScreenSize is to control the maximum effective screen size used in texture streaming calculations. It is primarily used in the rendering system, specifically for texture streaming optimization.
This setting variable is relied upon by the Unreal Engine’s texture streaming subsystem, which is part of the rendering module. It’s used to optimize texture memory usage and loading based on the current view of the scene.
The value of this variable is set through the console variable system in Unreal Engine. It’s defined as a TAutoConsoleVariable, which means it can be changed at runtime through console commands or configuration files.
The associated variable CVarStreamingScreenSizeEffectiveMax directly interacts with r.Streaming.MaxEffectiveScreenSize. They share the same value and purpose.
Developers must be aware that:
- Setting this variable to 0 means the actual vertical screen size will be used.
- Setting it to a value greater than 0 will clamp the wanted mip size calculation to this value for the vertical screen size component.
- This variable affects scalability, as indicated by the ECVF_Scalability flag.
Best practices when using this variable include:
- Use it to optimize texture streaming performance on different hardware configurations.
- Consider adjusting this value in scalability settings to balance visual quality and performance across different device capabilities.
- Monitor its impact on memory usage and loading times when modified.
Regarding the associated variable CVarStreamingScreenSizeEffectiveMax:
- It’s used to store and retrieve the value of r.Streaming.MaxEffectiveScreenSize.
- It’s accessed in the FRenderAssetStreamingSettings::Update() function to update the MaxEffectiveScreenSize member of the FRenderAssetStreamingSettings struct.
- This suggests that the value is used in various texture streaming calculations throughout the engine.
Developers should be aware that changes to this variable will affect the engine’s texture streaming behavior, potentially impacting both visual quality and performance. It’s important to test thoroughly when modifying this value to ensure optimal results across different scenarios and hardware configurations.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseScalability.ini:564, section: [TextureQuality@0]
- INI Section:
TextureQuality@0
- Raw value:
0f
- Is Array:
False
Location: <Workspace>/Engine/Config/BaseScalability.ini:575, section: [TextureQuality@1]
- INI Section:
TextureQuality@1
- Raw value:
0
- Is Array:
False
Location: <Workspace>/Engine/Config/BaseScalability.ini:586, section: [TextureQuality@2]
- INI Section:
TextureQuality@2
- Raw value:
0
- Is Array:
False
Location: <Workspace>/Engine/Config/BaseScalability.ini:597, section: [TextureQuality@3]
- INI Section:
TextureQuality@3
- Raw value:
0
- Is Array:
False
Location: <Workspace>/Engine/Config/BaseScalability.ini:608, section: [TextureQuality@Cine]
- INI Section:
TextureQuality@Cine
- Raw value:
0
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Streaming/TextureStreamingHelpers.cpp:83
Scope: file
Source code excerpt:
TAutoConsoleVariable<float> CVarStreamingScreenSizeEffectiveMax(
TEXT("r.Streaming.MaxEffectiveScreenSize"),
0,
TEXT("0: Use current actual vertical screen size\n")
TEXT("> 0: Clamp wanted mip size calculation to this value for the vertical screen size component."),
ECVF_Scalability
);
#Associated Variable and Callsites
This variable is associated with another variable named CVarStreamingScreenSizeEffectiveMax
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Streaming/TextureStreamingHelpers.cpp:82
Scope: file
Source code excerpt:
);
TAutoConsoleVariable<float> CVarStreamingScreenSizeEffectiveMax(
TEXT("r.Streaming.MaxEffectiveScreenSize"),
0,
TEXT("0: Use current actual vertical screen size\n")
TEXT("> 0: Clamp wanted mip size calculation to this value for the vertical screen size component."),
ECVF_Scalability
);
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Streaming/TextureStreamingHelpers.cpp:307
Scope (from outer to inner):
file
function void FRenderAssetStreamingSettings::Update
Source code excerpt:
void FRenderAssetStreamingSettings::Update()
{
MaxEffectiveScreenSize = CVarStreamingScreenSizeEffectiveMax.GetValueOnAnyThread();
MaxTempMemoryAllowed = CVarStreamingMaxTempMemoryAllowed.GetValueOnAnyThread();
HLODStrategy = CVarStreamingHLODStrategy.GetValueOnAnyThread();
GlobalMipBias = !GIsEditor ? FMath::FloorToInt(FMath::Max<float>(0.f, CVarStreamingMipBias.GetValueOnAnyThread())) : 0;
PoolSize = CVarStreamingPoolSize.GetValueOnAnyThread();
MeshPoolSize = CVarStreamingPoolSizeForMeshes.GetValueOnAnyThread();
bUsePerTextureBias = CVarStreamingUsePerTextureBias.GetValueOnAnyThread() != 0;