r.Streaming.MinLevelRenderAssetScreenSize
r.Streaming.MinLevelRenderAssetScreenSize
#Overview
name: r.Streaming.MinLevelRenderAssetScreenSize
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
If non-zero, levels only get handled if any of their referenced texture could be required of this size. Using conservative metrics on the level data.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.Streaming.MinLevelRenderAssetScreenSize is to control the minimum screen size threshold for handling level-referenced textures in the texture streaming system. This setting is part of Unreal Engine’s texture streaming optimization mechanism.
This setting variable is primarily used by the Engine’s texture streaming subsystem, specifically within the runtime streaming module. It’s referenced in the TextureStreamingHelpers.cpp file, which is part of the core Engine’s streaming functionality.
The value of this variable is set as a console variable with a default value of 100. It can be modified at runtime through the console or configuration files.
The associated variable CVarStreamingMinLevelRenderAssetScreenSize interacts directly with r.Streaming.MinLevelRenderAssetScreenSize, as they share the same value. This console variable is used to store and access the setting’s value within the C++ code.
Developers must be aware that this variable affects the performance and memory usage of texture streaming. If set to a non-zero value, it determines the minimum screen size at which level-referenced textures will be considered for streaming. This can help optimize texture streaming by ignoring levels that are unlikely to require high-resolution textures due to their small screen presence.
Best practices when using this variable include:
- Carefully tuning the value based on your game’s specific needs and performance characteristics.
- Testing different values to find the optimal balance between visual quality and performance.
- Considering the impact on different hardware configurations, especially those with limited memory.
- Using in conjunction with other texture streaming settings for a comprehensive optimization strategy.
Regarding the associated variable CVarStreamingMinLevelRenderAssetScreenSize:
This is an internal console variable used to store and access the r.Streaming.MinLevelRenderAssetScreenSize setting within the engine’s C++ code. It’s defined using the TAutoConsoleVariable template, which allows for easy integration with the engine’s console variable system.
The value of this variable is updated in the FRenderAssetStreamingSettings::Update() function, which suggests it’s part of a larger system for managing streaming settings. Developers should be aware that changes to the console variable will be reflected in this C++ variable, affecting the engine’s internal logic for texture streaming optimization.
When working with this variable, developers should:
- Understand that modifying the console variable r.Streaming.MinLevelRenderAssetScreenSize will directly affect this C++ variable.
- Be cautious when directly manipulating this variable in code, as it’s intended to reflect the console variable’s value.
- Consider the performance implications of frequently accessing or modifying this variable, especially in performance-critical code paths.
#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:243
Scope: file
Source code excerpt:
TAutoConsoleVariable<float> CVarStreamingMinLevelRenderAssetScreenSize(
TEXT("r.Streaming.MinLevelRenderAssetScreenSize"),
100,
TEXT("If non-zero, levels only get handled if any of their referenced texture could be required of this size. Using conservative metrics on the level data."),
ECVF_Default);
TAutoConsoleVariable<float> CVarStreamingMaxTextureUVDensity(
TEXT("r.Streaming.MaxTextureUVDensity"),
#Associated Variable and Callsites
This variable is associated with another variable named CVarStreamingMinLevelRenderAssetScreenSize
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Streaming/TextureStreamingHelpers.cpp:242
Scope: file
Source code excerpt:
ECVF_Default);
TAutoConsoleVariable<float> CVarStreamingMinLevelRenderAssetScreenSize(
TEXT("r.Streaming.MinLevelRenderAssetScreenSize"),
100,
TEXT("If non-zero, levels only get handled if any of their referenced texture could be required of this size. Using conservative metrics on the level data."),
ECVF_Default);
TAutoConsoleVariable<float> CVarStreamingMaxTextureUVDensity(
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Streaming/TextureStreamingHelpers.cpp:322
Scope (from outer to inner):
file
function void FRenderAssetStreamingSettings::Update
Source code excerpt:
PerTextureBiasViewBoostThreshold = CVarStreamingPerTextureBiasViewBoostThreshold.GetValueOnAnyThread();
MaxHiddenPrimitiveViewBoost = FMath::Max<float>(1.f, CVarStreamingMaxHiddenPrimitiveViewBoost.GetValueOnAnyThread());
MinLevelRenderAssetScreenSize = CVarStreamingMinLevelRenderAssetScreenSize.GetValueOnAnyThread();
MaxTextureUVDensity = CVarStreamingMaxTextureUVDensity.GetValueOnAnyThread();
bUseMaterialData = bUseNewMetrics && CVarStreamingUseMaterialData.GetValueOnAnyThread() != 0;
HiddenPrimitiveScale = bUseNewMetrics ? CVarStreamingHiddenPrimitiveScale.GetValueOnAnyThread() : 1.f;
LowResHandlingMode = (ELowResHandlingMode)CVarStreamingLowResHandlingMode.GetValueOnAnyThread();
bMipCalculationEnablePerLevelList = CVarStreamingMipCalculationEnablePerLevelList.GetValueOnAnyThread() != 0;
bPrioritizeMeshLODRetention = CVarPrioritizeMeshLODRetention.GetValueOnAnyThread() != 0;