r.DOF.Recombine.MinFullresBlurRadius

r.DOF.Recombine.MinFullresBlurRadius

#Overview

name: r.DOF.Recombine.MinFullresBlurRadius

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.Recombine.MinFullresBlurRadius is to control the minimal blurring radius used in full-resolution pixel width for the Depth of Field (DOF) effect in Unreal Engine’s rendering system. It specifically affects the slight out-of-focus effect when enabled.

This setting variable is primarily used in the rendering system, specifically in the post-processing pipeline for Depth of Field effects. It is part of the Renderer module, as evidenced by its location in the “Runtime/Renderer/Private/PostProcess/DiaphragmDOF.cpp” file.

The value of this variable is set through a console variable (CVarMinimalFullresBlurRadius) with a default value of 0.1f. It can be modified at runtime through console commands or programmatically.

The associated variable CVarMinimalFullresBlurRadius directly interacts with r.DOF.Recombine.MinFullresBlurRadius, as they share the same value and purpose.

Developers must be aware that this variable only takes effect when the slight out-of-focus DOF is enabled. It determines the threshold at which the DOF effect begins to be applied, affecting the visual quality and performance of the rendering.

Best practices when using this variable include:

  1. Adjusting it carefully to balance visual quality and performance.
  2. Testing different values to find the optimal setting for your specific scene and target hardware.
  3. Considering the impact on different display resolutions, as the effect is based on pixel width.

Regarding the associated variable CVarMinimalFullresBlurRadius:

When working with CVarMinimalFullresBlurRadius, developers should consider its impact on both visual quality and performance, as increasing the minimal blur radius may affect rendering time, especially on lower-end hardware.

#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:121

Scope (from outer to inner):

file
namespace    anonymous

Source code excerpt:


TAutoConsoleVariable<float> CVarMinimalFullresBlurRadius(
	TEXT("r.DOF.Recombine.MinFullresBlurRadius"),
	0.1f,
	TEXT("Minimal blurring radius used in full resolution pixel width to actually do ")
	TEXT("DOF  when slight out of focus is enabled (default = 0.1)."),
	ECVF_RenderThreadSafe);

TAutoConsoleVariable<int32> CVarDOFTemporalAAQuality(

#Associated Variable and Callsites

This variable is associated with another variable named CVarMinimalFullresBlurRadius. They share the same value. See the following C++ source code.

#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/PostProcess/DiaphragmDOF.cpp:120

Scope (from outer to inner):

file
namespace    anonymous

Source code excerpt:

	ECVF_Scalability | ECVF_RenderThreadSafe);

TAutoConsoleVariable<float> CVarMinimalFullresBlurRadius(
	TEXT("r.DOF.Recombine.MinFullresBlurRadius"),
	0.1f,
	TEXT("Minimal blurring radius used in full resolution pixel width to actually do ")
	TEXT("DOF  when slight out of focus is enabled (default = 0.1)."),
	ECVF_RenderThreadSafe);

#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/PostProcess/DiaphragmDOF.cpp:1438

Scope (from outer to inner):

file
function     bool DiaphragmDOF::AddPasses

Source code excerpt:

	// doing slight out of focus convolution.
	const float MinRequiredBlurringRadius = bRecombineDoesSlightOutOfFocus
		? (CVarMinimalFullresBlurRadius.GetValueOnRenderThread() * 0.5f)
		: kMinimalAbsGatherPassCocRadius;

	// Whether to use R11G11B10 + separate C0C buffer.
	const bool bRGBBufferSeparateCocBuffer = (
		SceneColorFormat == PF_FloatR11G11B10 &&