r.GTAO.PauseJitter
r.GTAO.PauseJitter
#Overview
name: r.GTAO.PauseJitter
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Whether to pause Jitter when Temporal filter is off \n
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.GTAO.PauseJitter is to control whether jittering should be paused in the Ground Truth Ambient Occlusion (GTAO) rendering process when the temporal filter is off.
This setting variable is primarily used within the rendering system of Unreal Engine, specifically in the ambient occlusion post-processing module. Based on the callsites, it’s evident that this variable is utilized in the Renderer module, particularly in the composition lighting subsystem.
The value of this variable is set through the console variable system in Unreal Engine. It’s defined as a TAutoConsoleVariable with a default value of 0, indicating that jittering is not paused by default.
The associated variable CVarGTAOPauseJitter directly interacts with r.GTAO.PauseJitter. They share the same value and purpose, with CVarGTAOPauseJitter being the C++ representation of the console variable.
Developers must be aware that this variable affects the visual quality and performance of ambient occlusion rendering. Pausing jitter can potentially reduce noise in the GTAO effect but may also introduce more visible artifacts or patterns.
Best practices when using this variable include:
- Only modify it if you’re experiencing specific issues with GTAO quality or performance.
- Test thoroughly after changing the value, as it can significantly impact the visual output.
- Consider the interaction with other GTAO settings, particularly those related to temporal filtering.
Regarding the associated variable CVarGTAOPauseJitter:
The purpose of CVarGTAOPauseJitter is to provide programmatic access to the r.GTAO.PauseJitter setting within the C++ code of the engine.
This variable is used directly in the rendering code to determine whether to update the frame counter used for jittering. It’s checked in the ambient occlusion post-processing pass.
The value of CVarGTAOPauseJitter is set when r.GTAO.PauseJitter is modified, as they are essentially the same variable exposed in different ways.
CVarGTAOPauseJitter interacts with the ViewState object, which likely manages the persistent state of the view being rendered.
Developers should be aware that accessing CVarGTAOPauseJitter is done using the GetValueOnRenderThread() method, ensuring thread-safe access in the rendering code.
Best practices for using CVarGTAOPauseJitter include:
- Always access it using GetValueOnRenderThread() when in render thread code.
- Be cautious about modifying its value at runtime, as it can cause sudden changes in the rendered output.
- Consider caching its value if used frequently in performance-critical sections of code.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/CompositionLighting/PostProcessAmbientOcclusion.cpp:141
Scope: file
Source code excerpt:
static TAutoConsoleVariable<float> CVarGTAOPauseJitter(
TEXT("r.GTAO.PauseJitter"),
0,
TEXT("Whether to pause Jitter when Temporal filter is off \n "),
ECVF_RenderThreadSafe | ECVF_Scalability);
static TAutoConsoleVariable<int32> CVarGTAOUpsample(
#Associated Variable and Callsites
This variable is associated with another variable named CVarGTAOPauseJitter
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/CompositionLighting/PostProcessAmbientOcclusion.cpp:140
Scope: file
Source code excerpt:
ECVF_RenderThreadSafe | ECVF_Scalability);
static TAutoConsoleVariable<float> CVarGTAOPauseJitter(
TEXT("r.GTAO.PauseJitter"),
0,
TEXT("Whether to pause Jitter when Temporal filter is off \n "),
ECVF_RenderThreadSafe | ECVF_Scalability);
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/CompositionLighting/PostProcessAmbientOcclusion.cpp:416
Scope: file
Source code excerpt:
uint32 Frame = 0;
if (ViewState && (CVarGTAOPauseJitter.GetValueOnRenderThread() != 1))
{
Frame = ViewState->GetFrameIndex();
}
FGTAOShaderParameters Result{};