r.VT.MaxTilesProducedPerFrame
r.VT.MaxTilesProducedPerFrame
#Overview
name: r.VT.MaxTilesProducedPerFrame
The value of this variable can be defined or overridden in .ini config files. 8
.ini config files referencing this setting variable.
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Max number of pages that can be produced per frame
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.VT.MaxTilesProducedPerFrame is to control the maximum number of virtual texture pages that can be produced per frame in Unreal Engine’s rendering system. This setting is part of the Virtual Texturing (VT) system, which is used to efficiently manage large textures in memory.
This setting variable is primarily used by the Engine’s Virtual Texturing subsystem, which is part of the rendering module. It’s specifically referenced in the VirtualTextureScalability namespace, indicating its role in managing the scalability of virtual textures.
The value of this variable is set through a console variable (CVar) system. It’s initialized with a default value of 30, but can be changed at runtime through console commands or project settings.
The variable interacts directly with its associated variable CVarMaxPagesProducedPerFrame. They share the same value and are essentially two ways to access the same setting.
Developers must be aware that this variable affects rendering performance and memory usage. Setting it too high might lead to performance issues, while setting it too low might result in slower texture streaming and poorer visual quality.
Best practices when using this variable include:
- Adjusting it based on the target hardware capabilities.
- Monitoring performance impact when changing its value.
- Considering it in conjunction with other virtual texturing settings for optimal results.
Regarding the associated variable CVarMaxPagesProducedPerFrame:
The purpose of CVarMaxPagesProducedPerFrame is identical to r.VT.MaxTilesProducedPerFrame. It’s an internal representation of the same setting, used within the engine’s C++ code.
This variable is used directly in the GetMaxPagesProducedPerFrame() function, which suggests it’s the primary way the engine accesses this setting internally.
The value of CVarMaxPagesProducedPerFrame is set and modified through the CVar system, just like r.VT.MaxTilesProducedPerFrame.
Developers should be aware that modifying r.VT.MaxTilesProducedPerFrame will also affect CVarMaxPagesProducedPerFrame, and vice versa.
Best practices for CVarMaxPagesProducedPerFrame are the same as for r.VT.MaxTilesProducedPerFrame, as they represent the same setting. When developing systems that interact with this setting, it’s generally better to use the GetMaxPagesProducedPerFrame() function rather than accessing the CVar directly, as this provides a layer of abstraction and potential for future optimization.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/Android/AndroidScalability.ini:202, section: [TextureQuality@0]
- INI Section:
TextureQuality@0
- Raw value:
1
- Is Array:
False
Location: <Workspace>/Engine/Config/Android/AndroidScalability.ini:206, section: [TextureQuality@1]
- INI Section:
TextureQuality@1
- Raw value:
1
- Is Array:
False
Location: <Workspace>/Engine/Config/Android/AndroidScalability.ini:210, section: [TextureQuality@2]
- INI Section:
TextureQuality@2
- Raw value:
1
- Is Array:
False
Location: <Workspace>/Engine/Config/Android/AndroidScalability.ini:214, section: [TextureQuality@3]
- INI Section:
TextureQuality@3
- Raw value:
2
- Is Array:
False
Location: <Workspace>/Engine/Config/IOS/IOSScalability.ini:202, section: [TextureQuality@0]
- INI Section:
TextureQuality@0
- Raw value:
1
- Is Array:
False
Location: <Workspace>/Engine/Config/IOS/IOSScalability.ini:206, section: [TextureQuality@1]
- INI Section:
TextureQuality@1
- Raw value:
1
- Is Array:
False
Location: <Workspace>/Engine/Config/IOS/IOSScalability.ini:210, section: [TextureQuality@2]
- INI Section:
TextureQuality@2
- Raw value:
1
- Is Array:
False
Location: <Workspace>/Engine/Config/IOS/IOSScalability.ini:214, section: [TextureQuality@3]
- INI Section:
TextureQuality@3
- Raw value:
2
- 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/VT/VirtualTextureScalability.cpp:34
Scope (from outer to inner):
file
namespace VirtualTextureScalability
Source code excerpt:
static TAutoConsoleVariable<int32> CVarMaxPagesProducedPerFrame(
TEXT("r.VT.MaxTilesProducedPerFrame"),
30,
TEXT("Max number of pages that can be produced per frame"),
ECVF_RenderThreadSafe | ECVF_Scalability
);
#if WITH_EDITOR
#Associated Variable and Callsites
This variable is associated with another variable named CVarMaxPagesProducedPerFrame
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/VT/VirtualTextureScalability.cpp:33
Scope (from outer to inner):
file
namespace VirtualTextureScalability
Source code excerpt:
);
static TAutoConsoleVariable<int32> CVarMaxPagesProducedPerFrame(
TEXT("r.VT.MaxTilesProducedPerFrame"),
30,
TEXT("Max number of pages that can be produced per frame"),
ECVF_RenderThreadSafe | ECVF_Scalability
);
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/VT/VirtualTextureScalability.cpp:183
Scope (from outer to inner):
file
namespace VirtualTextureScalability
function int32 GetMaxPagesProducedPerFrame
Source code excerpt:
int32 GetMaxPagesProducedPerFrame()
{
return CVarMaxPagesProducedPerFrame.GetValueOnAnyThread();
}
int32 GetMaxContinuousUpdatesPerFrame()
{
#if WITH_EDITOR
// Don't want this scalability setting to affect editor because we rely on reactive updates while editing, like GPULightmass.