r.LocalFogVolume.TileCullingUseAsync
r.LocalFogVolume.TileCullingUseAsync
#Overview
name: r.LocalFogVolume.TileCullingUseAsync
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
True if we want to try and use culling on the async pipe.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.LocalFogVolume.TileCullingUseAsync is to control whether the local fog volume rendering system uses asynchronous culling on the tile-based rendering pipeline.
This setting variable is primarily used by the rendering system, specifically the local fog volume rendering subsystem within Unreal Engine 5. It is implemented in the Renderer module, as evident from the file path “Engine/Source/Runtime/Renderer/Private/LocalFogVolumeRendering.cpp”.
The value of this variable is set through the console variable system in Unreal Engine. It is initialized with a default value of 1 (true), indicating that asynchronous culling is enabled by default.
The associated variable CVarLocalFogVolumeTileCullingUseAsync interacts directly with r.LocalFogVolume.TileCullingUseAsync. This console variable is used to retrieve the current value of the setting in the engine’s code.
Developers must be aware that this variable affects the performance and behavior of local fog volume rendering. When enabled, it attempts to use culling on the async compute pipeline, which can potentially improve performance by offloading some work to a separate compute queue.
Best practices when using this variable include:
- Testing performance with both enabled and disabled states to determine the optimal setting for your specific use case.
- Considering the target hardware capabilities, as async compute may not be supported or beneficial on all platforms.
- Monitoring the impact on frame times and GPU utilization when adjusting this setting.
Regarding the associated variable CVarLocalFogVolumeTileCullingUseAsync:
Its purpose is to provide a programmatic way to access the value of r.LocalFogVolume.TileCullingUseAsync within the engine’s C++ code.
This variable is used in the Renderer module, specifically in the local fog volume rendering system. It’s typically accessed through the GetLocalFogVolumeTileCullingUseAsync() function, which combines this setting with a check for efficient async compute support.
The value of CVarLocalFogVolumeTileCullingUseAsync is set automatically based on the r.LocalFogVolume.TileCullingUseAsync console variable.
It interacts with the GSupportsEfficientAsyncCompute global variable, which likely indicates whether the current hardware supports efficient async compute operations.
Developers should be aware that changes to r.LocalFogVolume.TileCullingUseAsync will affect the behavior of code that uses CVarLocalFogVolumeTileCullingUseAsync.
Best practices include using the GetLocalFogVolumeTileCullingUseAsync() function to access this setting, as it incorporates additional checks for hardware support.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/LocalFogVolumeRendering.cpp:53
Scope: file
Source code excerpt:
static TAutoConsoleVariable<int32> CVarLocalFogVolumeTileCullingUseAsync(
TEXT("r.LocalFogVolume.TileCullingUseAsync"), 1,
TEXT("True if we want to try and use culling on the async pipe."),
ECVF_RenderThreadSafe);
static TAutoConsoleVariable<int32> CVarLocalFogVolumeTileDebug(
TEXT("r.LocalFogVolume.TileDebug"), 0,
TEXT("Debug the tiled rendering data complexity. 1: show per tile LFV count as color ; 2: same as one but also show the effect of pixel discard/clipping."),
#Associated Variable and Callsites
This variable is associated with another variable named CVarLocalFogVolumeTileCullingUseAsync
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/LocalFogVolumeRendering.cpp:52
Scope: file
Source code excerpt:
ECVF_RenderThreadSafe);
static TAutoConsoleVariable<int32> CVarLocalFogVolumeTileCullingUseAsync(
TEXT("r.LocalFogVolume.TileCullingUseAsync"), 1,
TEXT("True if we want to try and use culling on the async pipe."),
ECVF_RenderThreadSafe);
static TAutoConsoleVariable<int32> CVarLocalFogVolumeTileDebug(
TEXT("r.LocalFogVolume.TileDebug"), 0,
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/LocalFogVolumeRendering.cpp:88
Scope (from outer to inner):
file
function static bool GetLocalFogVolumeTileCullingUseAsync
Source code excerpt:
static bool GetLocalFogVolumeTileCullingUseAsync()
{
return GSupportsEfficientAsyncCompute && CVarLocalFogVolumeTileCullingUseAsync.GetValueOnRenderThread() > 0;
}
static float GetLocalFogVolumeMaxDensityIntoVolumetricFog()
{
return FMath::Max(0.0f, CVarLocalFogVolumeMaxDensityIntoVolumetricFog.GetValueOnRenderThread());
}