r.DOF.TemporalAAQuality
r.DOF.TemporalAAQuality
#Overview
name: r.DOF.TemporalAAQuality
The value of this variable can be defined or overridden in .ini config files. 4
.ini config files referencing this setting variable.
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Quality of temporal AA pass done in DOF.\n 0: Faster but lower quality; 1: Higher quality pass (default).
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.DOF.TemporalAAQuality is to control the quality of the temporal anti-aliasing (TAA) pass performed during the Depth of Field (DOF) effect in Unreal Engine’s rendering pipeline. This setting allows developers to balance between performance and visual quality in the DOF effect.
This setting variable is primarily used by the rendering system, specifically within the post-processing pipeline for Depth of Field effects.
The Unreal Engine subsystem that relies on this setting variable is the Renderer module, particularly the DiaphragmDOF (Depth of Field) component of the post-processing pipeline.
The value of this variable is set through a console variable (CVar) system. It’s initialized with a default value of 1, which corresponds to the higher quality setting.
The associated variable CVarDOFTemporalAAQuality interacts directly with r.DOF.TemporalAAQuality. They share the same value and purpose.
Developers must be aware that:
- This variable affects both visual quality and performance.
- It’s a scalability setting, meaning it can be adjusted based on different hardware capabilities.
- It’s render thread safe, allowing for real-time adjustments.
Best practices when using this variable include:
- Use the higher quality setting (1) for final renders or on high-end hardware.
- Consider using the lower quality setting (0) for performance-critical scenarios or on lower-end hardware.
- Test both settings to find the right balance between quality and performance for your specific use case.
Regarding the associated variable CVarDOFTemporalAAQuality:
- It’s the actual console variable that controls the r.DOF.TemporalAAQuality setting.
- It’s used in the DiaphragmDOF::AddPasses function to determine the quality of the TAA pass.
- When set to 0, it uses ETAAQuality::Medium, and when set to 1 (default), it uses ETAAQuality::High.
- Developers can access its value using GetValueOnRenderThread() method, which ensures thread-safe access in the render thread.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseScalability.ini:437, section: [PostProcessQuality@1]
- INI Section:
PostProcessQuality@1
- Raw value:
0 ; faster temporal accumulation
- Is Array:
False
Location: <Workspace>/Engine/Config/BaseScalability.ini:472, section: [PostProcessQuality@2]
- INI Section:
PostProcessQuality@2
- Raw value:
0 ; faster temporal accumulation
- Is Array:
False
Location: <Workspace>/Engine/Config/BaseScalability.ini:508, section: [PostProcessQuality@3]
- INI Section:
PostProcessQuality@3
- Raw value:
1 ; more stable temporal accumulation
- Is Array:
False
Location: <Workspace>/Engine/Config/BaseScalability.ini:546, section: [PostProcessQuality@Cine]
- INI Section:
PostProcessQuality@Cine
- Raw value:
1 ; more stable temporal accumulation
- 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/DiaphragmDOF.cpp:128
Scope (from outer to inner):
file
namespace anonymous
Source code excerpt:
TAutoConsoleVariable<int32> CVarDOFTemporalAAQuality(
TEXT("r.DOF.TemporalAAQuality"),
1,
TEXT("Quality of temporal AA pass done in DOF.\n")
TEXT(" 0: Faster but lower quality;")
TEXT(" 1: Higher quality pass (default)."),
ECVF_Scalability | ECVF_RenderThreadSafe);
#Associated Variable and Callsites
This variable is associated with another variable named CVarDOFTemporalAAQuality
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/PostProcess/DiaphragmDOF.cpp:127
Scope (from outer to inner):
file
namespace anonymous
Source code excerpt:
ECVF_RenderThreadSafe);
TAutoConsoleVariable<int32> CVarDOFTemporalAAQuality(
TEXT("r.DOF.TemporalAAQuality"),
1,
TEXT("Quality of temporal AA pass done in DOF.\n")
TEXT(" 0: Faster but lower quality;")
TEXT(" 1: Higher quality pass (default)."),
ECVF_Scalability | ECVF_RenderThreadSafe);
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/PostProcess/DiaphragmDOF.cpp:1478
Scope (from outer to inner):
file
function bool DiaphragmDOF::AddPasses
Source code excerpt:
TAAParameters.TopLeftCornerViewRects();
TAAParameters.Quality = CVarDOFTemporalAAQuality.GetValueOnRenderThread() == 0 ? ETAAQuality::Medium : ETAAQuality::High;
}
// Size of the view in GatherColorSetup.
FIntPoint FullResViewSize = View.ViewRect.Size();
FIntPoint PreprocessViewSize = FIntPoint::DivideAndRoundUp(FullResViewSize, PrefilteringResolutionDivisor);
FIntPoint GatheringViewSize = PreprocessViewSize;