r.FastVRam.DOFPostfilter
r.FastVRam.DOFPostfilter
#Overview
name: r.FastVRam.DOFPostfilter
This variable is created as a Console Variable (cvar).
- type:
Var
- help: ``
It is referenced in 4
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.FastVRam.DOFPostfilter is to control the allocation of fast VRAM for the Depth of Field (DOF) post-filter process in Unreal Engine’s rendering system.
This setting variable is primarily used by the Renderer module of Unreal Engine. It’s part of the Fast VRAM configuration system, which allows developers to optimize memory usage for various rendering processes.
The value of this variable is set through the FASTVRAM_CVAR macro, which is defined in the SceneRendering.cpp file. It’s initialized with a default value of 1, indicating that by default, the DOF post-filter process is allocated to fast VRAM.
This variable interacts closely with other DOF-related variables such as r.FastVRam.DOFSetup and r.FastVRam.DOFReduce. Together, these variables control different aspects of the DOF rendering process’s memory allocation.
Developers should be aware that changing this variable can affect the performance and memory usage of the DOF rendering process. Setting it to 0 would allocate the DOF post-filter process to regular VRAM instead of fast VRAM, which might impact rendering performance but could free up fast VRAM for other critical processes.
Best practices when using this variable include:
- Only modify it if you’re experiencing issues with VRAM allocation or DOF rendering performance.
- Test thoroughly after any changes, as it can impact overall rendering performance.
- Consider the balance between this and other Fast VRAM settings to optimize overall memory usage.
Regarding the associated variable DOFPostfilter:
The purpose of DOFPostfilter is to store the texture creation flags for the DOF post-filter process. It’s part of the FFastVramConfig struct, which manages the Fast VRAM configuration for various rendering processes.
This variable is used within the Renderer module to determine how textures for the DOF post-filter should be created and allocated in memory.
The value of DOFPostfilter is updated in the FFastVramConfig::Update() function, which uses the UpdateTextureFlagFromCVar function to set its value based on the r.FastVRam.DOFPostfilter CVar.
DOFPostfilter interacts directly with r.FastVRam.DOFPostfilter, essentially serving as the internal representation of the CVar’s value within the FFastVramConfig struct.
Developers should be aware that DOFPostfilter directly influences how textures for the DOF post-filter process are created and allocated. Changes to r.FastVRam.DOFPostfilter will be reflected in this variable.
Best practices for DOFPostfilter include:
- Avoid modifying it directly; instead, use the r.FastVRam.DOFPostfilter CVar to control its value.
- When debugging texture creation issues related to DOF post-filtering, check the value of this variable.
- Consider its value in conjunction with other texture creation flags in the FFastVramConfig struct for a comprehensive view of the Fast VRAM allocation strategy.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/SceneRendering.cpp:501
Scope: file
Source code excerpt:
FASTVRAM_CVAR(DOFSetup, 1);
FASTVRAM_CVAR(DOFReduce, 1);
FASTVRAM_CVAR(DOFPostfilter, 1);
FASTVRAM_CVAR(PostProcessMaterial, 1);
FASTVRAM_CVAR(CustomDepth, 0);
FASTVRAM_CVAR(ShadowPointLight, 0);
FASTVRAM_CVAR(ShadowPerObject, 0);
FASTVRAM_CVAR(ShadowCSM, 0);
#Associated Variable and Callsites
This variable is associated with another variable named DOFPostfilter
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/SceneRendering.cpp:501
Scope: file
Source code excerpt:
FASTVRAM_CVAR(DOFSetup, 1);
FASTVRAM_CVAR(DOFReduce, 1);
FASTVRAM_CVAR(DOFPostfilter, 1);
FASTVRAM_CVAR(PostProcessMaterial, 1);
FASTVRAM_CVAR(CustomDepth, 0);
FASTVRAM_CVAR(ShadowPointLight, 0);
FASTVRAM_CVAR(ShadowPerObject, 0);
FASTVRAM_CVAR(ShadowCSM, 0);
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/SceneRendering.cpp:701
Scope (from outer to inner):
file
function void FFastVramConfig::Update
Source code excerpt:
bDirty |= UpdateTextureFlagFromCVar(CVarFastVRam_DOFSetup, DOFSetup);
bDirty |= UpdateTextureFlagFromCVar(CVarFastVRam_DOFReduce, DOFReduce);
bDirty |= UpdateTextureFlagFromCVar(CVarFastVRam_DOFPostfilter, DOFPostfilter);
bDirty |= UpdateTextureFlagFromCVar(CVarFastVRam_CustomDepth, CustomDepth);
bDirty |= UpdateTextureFlagFromCVar(CVarFastVRam_ShadowPointLight, ShadowPointLight);
bDirty |= UpdateTextureFlagFromCVar(CVarFastVRam_ShadowPerObject, ShadowPerObject);
bDirty |= UpdateTextureFlagFromCVar(CVarFastVRam_ShadowCSM, ShadowCSM);
bDirty |= UpdateTextureFlagFromCVar(CVarFastVRam_PostProcessMaterial, PostProcessMaterial);
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/SceneRendering.h:2851
Scope: file
Source code excerpt:
ETextureCreateFlags DOFSetup;
ETextureCreateFlags DOFReduce;
ETextureCreateFlags DOFPostfilter;
ETextureCreateFlags PostProcessMaterial;
ETextureCreateFlags CustomDepth;
ETextureCreateFlags ShadowPointLight;
ETextureCreateFlags ShadowPerObject;
ETextureCreateFlags ShadowCSM;