r.HeterogeneousVolumes.CLOD.Bias
r.HeterogeneousVolumes.CLOD.Bias
#Overview
name: r.HeterogeneousVolumes.CLOD.Bias
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Biases evaluation result when computing Continuous Level-of-Detail (Default = 0.0)\n> 0: Coarser\n< 0: Sharper\n
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.HeterogeneousVolumes.CLOD.Bias is to control the Continuous Level-of-Detail (CLOD) computation for heterogeneous volumes in the rendering system. It allows developers to bias the evaluation result, affecting the level of detail in the rendered volumes.
This setting variable is used in the Renderer module of Unreal Engine, specifically within the HeterogeneousVolumes subsystem. It’s part of the rendering pipeline that handles volumetric rendering.
The value of this variable is set through the console variable system in Unreal Engine. It’s defined with a default value of 0.0, but can be modified at runtime or through configuration files.
The associated variable CVarHeterogeneousVolumesCLODBias is directly linked to r.HeterogeneousVolumes.CLOD.Bias. It’s an instance of TAutoConsoleVariable
Developers should be aware that:
- Positive values will result in coarser detail.
- Negative values will result in sharper detail.
- The variable is render thread safe, meaning it can be safely accessed and modified from the render thread.
Best practices when using this variable include:
- Use it to fine-tune the balance between performance and visual quality in volumetric rendering.
- Be cautious when setting extreme values, as they may significantly impact either performance or visual quality.
- Test thoroughly with different values to find the optimal setting for your specific use case.
Regarding the associated variable CVarHeterogeneousVolumesCLODBias:
- It’s used to access the value of r.HeterogeneousVolumes.CLOD.Bias within the C++ code.
- The GetCLODBias() function in the HeterogeneousVolumes namespace retrieves the current value using GetValueOnRenderThread().
- When working with heterogeneous volumes in C++, developers should use CVarHeterogeneousVolumesCLODBias or the GetCLODBias() function to access the current CLOD bias value.
- Any changes to the console variable will be reflected in the value returned by these methods.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/HeterogeneousVolumes/HeterogeneousVolumes.cpp:254
Scope: file
Source code excerpt:
static TAutoConsoleVariable<float> CVarHeterogeneousVolumesCLODBias(
TEXT("r.HeterogeneousVolumes.CLOD.Bias"),
0.0,
TEXT("Biases evaluation result when computing Continuous Level-of-Detail (Default = 0.0)\n")
TEXT("> 0: Coarser\n")
TEXT("< 0: Sharper\n"),
ECVF_RenderThreadSafe
);
#Associated Variable and Callsites
This variable is associated with another variable named CVarHeterogeneousVolumesCLODBias
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/HeterogeneousVolumes/HeterogeneousVolumes.cpp:253
Scope: file
Source code excerpt:
);
static TAutoConsoleVariable<float> CVarHeterogeneousVolumesCLODBias(
TEXT("r.HeterogeneousVolumes.CLOD.Bias"),
0.0,
TEXT("Biases evaluation result when computing Continuous Level-of-Detail (Default = 0.0)\n")
TEXT("> 0: Coarser\n")
TEXT("< 0: Sharper\n"),
ECVF_RenderThreadSafe
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/HeterogeneousVolumes/HeterogeneousVolumes.cpp:513
Scope (from outer to inner):
file
namespace HeterogeneousVolumes
function float GetCLODBias
Source code excerpt:
float GetCLODBias()
{
return CVarHeterogeneousVolumesCLODBias.GetValueOnRenderThread();
}
// Convenience Utils
int GetVoxelCount(FIntVector VolumeResolution)
{
return VolumeResolution.X * VolumeResolution.Y * VolumeResolution.Z;