r.DOF.Recombine.Quality
r.DOF.Recombine.Quality
#Overview
name: r.DOF.Recombine.Quality
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:
Configures the quality of the recombine pass.\n 0: No slight out of focus;\n 1: Slight out of focus 24spp;\n 2: Slight out of focus 32spp (default).
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.DOF.Recombine.Quality is to configure the quality of the recombine pass in the Depth of Field (DOF) effect within Unreal Engine’s rendering system. This setting variable specifically controls the level of detail for slight out-of-focus areas in the image.
This setting variable is primarily used by the Renderer module of Unreal Engine, specifically within the post-processing system for Depth of Field effects. It’s part of the DiaphragmDOF (Diaphragm Depth of Field) implementation.
The value of this variable is set through a console variable (CVar) system. It’s defined with a default value of 2, but can be changed at runtime or through configuration files.
The associated variable CVarRecombineQuality directly interacts with r.DOF.Recombine.Quality. They share the same value and purpose.
Developers should be aware that this variable affects the visual quality and performance of the Depth of Field effect. Higher values provide better quality but may impact performance.
Best practices when using this variable include:
- Consider the target hardware when setting this value.
- Balance visual quality with performance requirements.
- Test different values to find the optimal setting for your specific use case.
Regarding the associated variable CVarRecombineQuality:
The purpose of CVarRecombineQuality is the same as r.DOF.Recombine.Quality - to control the quality of the DOF recombine pass.
It’s used within the Renderer module, specifically in the DiaphragmDOF implementation.
The value is set when the TAutoConsoleVariable is initialized, but can be changed at runtime using console commands.
This variable directly controls the RecombineQuality value used in the AddPasses function of the DiaphragmDOF class.
Developers should be aware that this variable is clamped between 0 and kMaxRecombineQuality (which is likely defined elsewhere in the code).
Best practices include:
- Use GetValueOnRenderThread() when accessing this variable in render thread code.
- Be aware of the performance implications of higher quality settings.
- Consider exposing this setting to end-users for fine-tuning if your game has varying performance targets.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseScalability.ini:436, section: [PostProcessQuality@1]
- INI Section:
PostProcessQuality@1
- Raw value:
0 ; no slight out of focus
- Is Array:
False
Location: <Workspace>/Engine/Config/BaseScalability.ini:471, section: [PostProcessQuality@2]
- INI Section:
PostProcessQuality@2
- Raw value:
0 ; no slight out of focus
- Is Array:
False
Location: <Workspace>/Engine/Config/BaseScalability.ini:506, section: [PostProcessQuality@3]
- INI Section:
PostProcessQuality@3
- Raw value:
1 ; cheap slight out of focus
- Is Array:
False
Location: <Workspace>/Engine/Config/BaseScalability.ini:544, section: [PostProcessQuality@Cine]
- INI Section:
PostProcessQuality@Cine
- Raw value:
2 ; highest slight out of focus
- 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:112
Scope (from outer to inner):
file
namespace anonymous
Source code excerpt:
TAutoConsoleVariable<int32> CVarRecombineQuality(
TEXT("r.DOF.Recombine.Quality"),
2,
TEXT("Configures the quality of the recombine pass.\n")
TEXT(" 0: No slight out of focus;\n")
TEXT(" 1: Slight out of focus 24spp;\n")
TEXT(" 2: Slight out of focus 32spp (default)."),
ECVF_Scalability | ECVF_RenderThreadSafe);
#Associated Variable and Callsites
This variable is associated with another variable named CVarRecombineQuality
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/PostProcess/DiaphragmDOF.cpp:111
Scope (from outer to inner):
file
namespace anonymous
Source code excerpt:
ECVF_Scalability | ECVF_RenderThreadSafe);
TAutoConsoleVariable<int32> CVarRecombineQuality(
TEXT("r.DOF.Recombine.Quality"),
2,
TEXT("Configures the quality of the recombine pass.\n")
TEXT(" 0: No slight out of focus;\n")
TEXT(" 1: Slight out of focus 24spp;\n")
TEXT(" 2: Slight out of focus 32spp (default)."),
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/PostProcess/DiaphragmDOF.cpp:1416
Scope (from outer to inner):
file
function bool DiaphragmDOF::AddPasses
Source code excerpt:
// Quality setting for the recombine pass.
const int32 RecombineQuality = bSupportsSlightOutOfFocus ? FMath::Clamp(CVarRecombineQuality.GetValueOnRenderThread(), 0, kMaxRecombineQuality) : 0;
// Resolution divisor.
const int32 PrefilteringResolutionDivisor = CVarDOFGatherResDivisor.GetValueOnRenderThread() >= 2 ? 2 : 1;
// Minimal absolute Coc radius to spawn a gather pass. Blurring radius under this are considered not great looking.
// This is assuming the pass is opacity blending with a ramp from 1 to 2. This can not be exposed as a cvar,