r.HeterogeneousVolumes.Tessellation.BottomLevelGrid.HomogeneousAggregationThreshold
r.HeterogeneousVolumes.Tessellation.BottomLevelGrid.HomogeneousAggregationThreshold
#Overview
name: r.HeterogeneousVolumes.Tessellation.BottomLevelGrid.HomogeneousAggregationThreshold
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Threshold for bottom-level voxel homogeneous aggregation (Default = 1.0e-3)\n
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.HeterogeneousVolumes.Tessellation.BottomLevelGrid.HomogeneousAggregationThreshold is to set a threshold for bottom-level voxel homogeneous aggregation in the heterogeneous volumes rendering system of Unreal Engine 5.
This setting variable is primarily used by the Renderer module, specifically within the heterogeneous volumes rendering subsystem. It’s part of the voxel grid pipeline for rendering complex volumetric effects.
The value of this variable is set as a console variable with a default value of 1.0e-3 (0.001). It can be modified at runtime through the console or configuration files.
The associated variable CVarHeterogeneousVolumesBottomLevelGridHomogeneousAggregationThreshold directly interacts with this setting. It’s the C++ representation of the console variable and is used to retrieve the current value of the setting within the engine’s code.
Developers should be aware that this variable affects the performance and visual quality of heterogeneous volume rendering. A lower threshold may result in more detailed rendering but could impact performance, while a higher threshold might improve performance at the cost of some visual fidelity.
Best practices when using this variable include:
- Experimenting with different values to find the optimal balance between performance and visual quality for your specific use case.
- Considering the target hardware when setting this value, as lower-end devices might benefit from a higher threshold.
- Using this in conjunction with other heterogeneous volume rendering settings for best results.
Regarding the associated variable CVarHeterogeneousVolumesBottomLevelGridHomogeneousAggregationThreshold:
This is an internal representation of the console variable within the engine’s C++ code. It’s used to access the current value of the setting in a thread-safe manner, specifically on the render thread. The GetValueOnRenderThread() function is used to retrieve the current value, ensuring that it’s accessed safely in the context of rendering operations.
Developers working directly with the engine’s C++ code should use this variable when they need to access the homogeneous aggregation threshold value in render thread operations related to heterogeneous volume rendering. It’s important to note that this variable should only be accessed on the render thread to ensure thread safety and correct behavior of the rendering system.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/HeterogeneousVolumes/HeterogeneousVolumesVoxelGridPipeline.cpp:149
Scope: file
Source code excerpt:
static TAutoConsoleVariable<float> CVarHeterogeneousVolumesBottomLevelGridHomogeneousAggregationThreshold(
TEXT("r.HeterogeneousVolumes.Tessellation.BottomLevelGrid.HomogeneousAggregationThreshold"),
1.0e-3,
TEXT("Threshold for bottom-level voxel homogeneous aggregation (Default = 1.0e-3)\n"),
ECVF_RenderThreadSafe
);
static TAutoConsoleVariable<int32> CVarHeterogeneousVolumesIndirectionGrid(
#Associated Variable and Callsites
This variable is associated with another variable named CVarHeterogeneousVolumesBottomLevelGridHomogeneousAggregationThreshold
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/HeterogeneousVolumes/HeterogeneousVolumesVoxelGridPipeline.cpp:148
Scope: file
Source code excerpt:
);
static TAutoConsoleVariable<float> CVarHeterogeneousVolumesBottomLevelGridHomogeneousAggregationThreshold(
TEXT("r.HeterogeneousVolumes.Tessellation.BottomLevelGrid.HomogeneousAggregationThreshold"),
1.0e-3,
TEXT("Threshold for bottom-level voxel homogeneous aggregation (Default = 1.0e-3)\n"),
ECVF_RenderThreadSafe
);
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/HeterogeneousVolumes/HeterogeneousVolumesVoxelGridPipeline.cpp:368
Scope (from outer to inner):
file
namespace HeterogeneousVolumes
function float GetHomogeneousAggregationThreshold
Source code excerpt:
float GetHomogeneousAggregationThreshold()
{
return CVarHeterogeneousVolumesBottomLevelGridHomogeneousAggregationThreshold.GetValueOnRenderThread();
}
bool EnableIndirectionGrid()
{
return CVarHeterogeneousVolumesIndirectionGrid.GetValueOnRenderThread() != 0;
}