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).

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:

  1. Setting this variable to 0 means the actual vertical screen size will be used.
  2. Setting it to a value greater than 0 will clamp the wanted mip size calculation to this value for the vertical screen size component.
  3. This variable affects scalability, as indicated by the ECVF_Scalability flag.

Best practices when using this variable include:

  1. Use it to optimize texture streaming performance on different hardware configurations.
  2. Consider adjusting this value in scalability settings to balance visual quality and performance across different device capabilities.
  3. Monitor its impact on memory usage and loading times when modified.

Regarding the associated variable CVarStreamingScreenSizeEffectiveMax:

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]

Location: <Workspace>/Engine/Config/BaseScalability.ini:575, section: [TextureQuality@1]

Location: <Workspace>/Engine/Config/BaseScalability.ini:586, section: [TextureQuality@2]

Location: <Workspace>/Engine/Config/BaseScalability.ini:597, section: [TextureQuality@3]

Location: <Workspace>/Engine/Config/BaseScalability.ini:608, section: [TextureQuality@Cine]

#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;