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

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:

  1. This variable affects both visual quality and performance.
  2. It’s a scalability setting, meaning it can be adjusted based on different hardware capabilities.
  3. It’s render thread safe, allowing for real-time adjustments.

Best practices when using this variable include:

  1. Use the higher quality setting (1) for final renders or on high-end hardware.
  2. Consider using the lower quality setting (0) for performance-critical scenarios or on lower-end hardware.
  3. Test both settings to find the right balance between quality and performance for your specific use case.

Regarding the associated variable CVarDOFTemporalAAQuality:

#Setting Variables

#References In INI files

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

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

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

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

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