r.TSR.History.R11G11B10
r.TSR.History.R11G11B10
#Overview
name: r.TSR.History.R11G11B10
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:
Select the bitdepth of the history. r.TSR.History.R11G11B10=1 Saves memory bandwidth that is of particular interest of the TSR\'s UpdateHistory\'s runtime performance by saving memory both at previous frame\'s history reprojection and write out of the output and new history.\nThis optimisation is unsupported with r.PostProcessing.PropagateAlpha=1.\n\nPlease also not that increasing r.TSR.History.ScreenPercentage=200 adds 2 additional implicit encoding bits in the history compared to the TSR.Output\'s bitdepth thanks to the downscaling pass from TSR history resolution to TSR output resolution.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.TSR.History.R11G11B10 is to control the bit depth of the history buffer in Unreal Engine 5’s Temporal Super Resolution (TSR) system. This setting is part of the rendering system, specifically the post-processing pipeline.
This setting variable is primarily used by the Temporal Super Resolution subsystem within Unreal Engine’s renderer module. It’s referenced in the TemporalSuperResolution.cpp file, which is part of the core rendering implementation.
The value of this variable is set through a console variable (CVarTSRR11G11B10History) with a default value of 1. It can be changed at runtime through console commands or project settings.
This variable interacts closely with the associated variable CVarTSRR11G11B10History, which is the actual console variable implementation. They share the same value and purpose.
Developers must be aware of several important aspects when using this variable:
- Setting this to 1 (enabled) saves memory bandwidth, which can improve the performance of TSR’s UpdateHistory operation.
- This optimization is incompatible with r.PostProcessing.PropagateAlpha=1.
- The effect of this setting is influenced by r.TSR.History.ScreenPercentage.
Best practices for using this variable include:
- Enable it (set to 1) when optimizing for performance, especially on bandwidth-constrained platforms.
- Disable it (set to 0) when working with alpha channel propagation in post-processing.
- Consider the interaction with r.TSR.History.ScreenPercentage when fine-tuning TSR performance and quality.
Regarding the associated variable CVarTSRR11G11B10History:
- It’s the actual console variable implementation of r.TSR.History.R11G11B10.
- It’s used to determine the pixel format of the history color buffer in the TSR system.
- When enabled and alpha support is not required, it sets the history color format to PF_FloatR11G11B10, otherwise, it uses PF_FloatRGBA.
- Developers should be aware that this variable directly affects the memory usage and potentially the visual quality of the TSR system.
- Best practice is to profile the performance and visual quality with this setting enabled and disabled to determine the optimal configuration for your specific use case.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseScalability.ini:55, section: [AntiAliasingQuality@0]
- INI Section:
AntiAliasingQuality@0
- Raw value:
1
- Is Array:
False
Location: <Workspace>/Engine/Config/BaseScalability.ini:65, section: [AntiAliasingQuality@1]
- INI Section:
AntiAliasingQuality@1
- Raw value:
1
- Is Array:
False
Location: <Workspace>/Engine/Config/BaseScalability.ini:75, section: [AntiAliasingQuality@2]
- INI Section:
AntiAliasingQuality@2
- Raw value:
1
- Is Array:
False
Location: <Workspace>/Engine/Config/BaseScalability.ini:85, section: [AntiAliasingQuality@3]
- INI Section:
AntiAliasingQuality@3
- Raw value:
1
- Is Array:
False
Location: <Workspace>/Engine/Config/BaseScalability.ini:95, section: [AntiAliasingQuality@Cine]
- INI Section:
AntiAliasingQuality@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/Renderer/Private/PostProcess/TemporalSuperResolution.cpp:48
Scope (from outer to inner):
file
namespace anonymous
Source code excerpt:
TAutoConsoleVariable<int32> CVarTSRR11G11B10History(
TEXT("r.TSR.History.R11G11B10"), 1,
TEXT("Select the bitdepth of the history. r.TSR.History.R11G11B10=1 Saves memory bandwidth that is of particular interest of the TSR's ")
TEXT("UpdateHistory's runtime performance by saving memory both at previous frame's history reprojection and write out of the output and ")
TEXT("new history.\n")
TEXT("This optimisation is unsupported with r.PostProcessing.PropagateAlpha=1.\n")
TEXT("\n")
TEXT("Please also not that increasing r.TSR.History.ScreenPercentage=200 adds 2 additional implicit encoding bits in the history compared to the TSR.Output's bitdepth thanks to the downscaling pass from TSR history resolution to TSR output resolution."),
#Associated Variable and Callsites
This variable is associated with another variable named CVarTSRR11G11B10History
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/PostProcess/TemporalSuperResolution.cpp:47
Scope (from outer to inner):
file
namespace anonymous
Source code excerpt:
ECVF_Scalability | ECVF_RenderThreadSafe);
TAutoConsoleVariable<int32> CVarTSRR11G11B10History(
TEXT("r.TSR.History.R11G11B10"), 1,
TEXT("Select the bitdepth of the history. r.TSR.History.R11G11B10=1 Saves memory bandwidth that is of particular interest of the TSR's ")
TEXT("UpdateHistory's runtime performance by saving memory both at previous frame's history reprojection and write out of the output and ")
TEXT("new history.\n")
TEXT("This optimisation is unsupported with r.PostProcessing.PropagateAlpha=1.\n")
TEXT("\n")
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/PostProcess/TemporalSuperResolution.cpp:1333
Scope (from outer to inner):
file
function FDefaultTemporalUpscaler::FOutputs AddTemporalSuperResolutionPasses
Source code excerpt:
EPixelFormat ColorFormat = bSupportsAlpha ? PF_FloatRGBA : PF_FloatR11G11B10;
EPixelFormat HistoryColorFormat = (CVarTSRR11G11B10History.GetValueOnRenderThread() != 0 && !bSupportsAlpha) ? PF_FloatR11G11B10 : PF_FloatRGBA;
int32 RejectionAntiAliasingQuality = FMath::Clamp(CVarTSRRejectionAntiAliasingQuality.GetValueOnRenderThread(), 1, 2);
if (UpdateHistoryQuality == FTSRUpdateHistoryCS::EQuality::Low)
{
RejectionAntiAliasingQuality = 0;
}