r.Streaming.Boost
r.Streaming.Boost
#Overview
name: r.Streaming.Boost
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:
=1.0: normal\n<1.0: decrease wanted mip levels\n>1.0: increase wanted mip levels
It is referenced in 5
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.Streaming.Boost is to control the level of detail for streamed textures in the Unreal Engine’s rendering system. It acts as a multiplier for the desired mip levels of textures, allowing developers to adjust the overall texture quality and streaming behavior.
This setting variable is primarily used by the texture streaming subsystem within Unreal Engine’s rendering module. It directly affects how the engine determines which mip levels of textures should be loaded and displayed.
The value of this variable is set through the console variable system. It’s defined as a TAutoConsoleVariable with a default value of 1.0f, which represents normal behavior. Values less than 1.0 will decrease the desired mip levels (reducing texture quality), while values greater than 1.0 will increase the desired mip levels (improving texture quality at the cost of memory and streaming performance).
The r.Streaming.Boost variable interacts closely with CVarStreamingMinBoost. In the code, the actual boost factor used is the maximum of r.Streaming.Boost and the minimum boost value, ensuring that the boost factor never falls below a certain threshold.
Developers should be aware that modifying this variable can have significant impacts on both visual quality and performance. Increasing the value will improve texture quality but may lead to increased memory usage and potential streaming issues. Decreasing the value will reduce texture quality but may improve performance on lower-end systems.
Best practices for using this variable include:
- Use it in conjunction with other streaming settings for fine-tuned control.
- Consider platform-specific adjustments, as different hardware may benefit from different boost values.
- Test thoroughly across various scenarios to ensure a good balance between quality and performance.
- Use it as part of a broader scalability strategy, possibly adjusting it based on user-selected quality settings.
Regarding the associated variable CVarStreamingBoost, it is the actual console variable object that stores and provides access to the r.Streaming.Boost value. It’s used throughout the engine code to retrieve the current boost value, typically via GetValueOnGameThread(). This variable is crucial in the texture streaming calculations, particularly when determining the effective boost factor for texture mip level selection.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseScalability.ini:559, section: [TextureQuality@0]
- INI Section:
TextureQuality@0
- Raw value:
0.3
- Is Array:
False
Location: <Workspace>/Engine/Config/BaseScalability.ini:570, section: [TextureQuality@1]
- INI Section:
TextureQuality@1
- Raw value:
1
- Is Array:
False
Location: <Workspace>/Engine/Config/BaseScalability.ini:581, section: [TextureQuality@2]
- INI Section:
TextureQuality@2
- Raw value:
1
- Is Array:
False
Location: <Workspace>/Engine/Config/BaseScalability.ini:592, section: [TextureQuality@3]
- INI Section:
TextureQuality@3
- Raw value:
1
- Is Array:
False
Location: <Workspace>/Engine/Config/BaseScalability.ini:603, section: [TextureQuality@Cine]
- INI Section:
TextureQuality@Cine
- Raw value:
1
- 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:67
Scope: file
Source code excerpt:
TAutoConsoleVariable<float> CVarStreamingBoost(
TEXT("r.Streaming.Boost"),
1.0f,
TEXT("=1.0: normal\n")
TEXT("<1.0: decrease wanted mip levels\n")
TEXT(">1.0: increase wanted mip levels"),
ECVF_Scalability | ECVF_ExcludeFromPreview
);
#Associated Variable and Callsites
This variable is associated with another variable named CVarStreamingBoost
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/ContentStreaming.cpp:637
Scope (from outer to inner):
file
function void IStreamingManager::AddViewInformation
Source code excerpt:
{
const float MinBoost = CVarStreamingMinBoost.GetValueOnGameThread();
const float BoostScale = FMath::Max(CVarStreamingBoost.GetValueOnGameThread(),MinBoost);
BoostFactor *= BoostScale;
if ( bPendingRemoveViews )
{
bPendingRemoveViews = false;
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/ContentStreaming.cpp:682
Scope (from outer to inner):
file
function void IStreamingManager::AddViewLocation
Source code excerpt:
{
const float MinBoost = CVarStreamingMinBoost.GetValueOnGameThread();
const float BoostScale = FMath::Max(CVarStreamingBoost.GetValueOnGameThread(),MinBoost);
BoostFactor *= BoostScale;
if ( bPendingRemoveViews )
{
bPendingRemoveViews = false;
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Streaming/TextureStreamingHelpers.cpp:66
Scope: file
Source code excerpt:
ECVF_Default);
TAutoConsoleVariable<float> CVarStreamingBoost(
TEXT("r.Streaming.Boost"),
1.0f,
TEXT("=1.0: normal\n")
TEXT("<1.0: decrease wanted mip levels\n")
TEXT(">1.0: increase wanted mip levels"),
ECVF_Scalability | ECVF_ExcludeFromPreview
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Streaming/TextureStreamingHelpers.h:57
Scope: file
Source code excerpt:
#endif
extern TAutoConsoleVariable<float> CVarStreamingBoost;
extern TAutoConsoleVariable<float> CVarStreamingMinBoost;
extern TAutoConsoleVariable<int32> CVarStreamingUseFixedPoolSize;
extern TAutoConsoleVariable<int32> CVarStreamingPoolSize;
extern TAutoConsoleVariable<int32> CVarStreamingCheckBuildStatus;
extern TAutoConsoleVariable<int32> CVarStreamingUseMaterialData;
extern TAutoConsoleVariable<int32> CVarStreamingNumStaticComponentsProcessedPerFrame;