r.Lumen.ScreenProbeGather.HairStrands.VoxelTrace

r.Lumen.ScreenProbeGather.HairStrands.VoxelTrace

#Overview

name: r.Lumen.ScreenProbeGather.HairStrands.VoxelTrace

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.Lumen.ScreenProbeGather.HairStrands.VoxelTrace is to control whether to trace against the hair voxel structure for hair casting shadows onto opaque surfaces in Unreal Engine’s Lumen lighting system.

This setting variable is primarily used in the Lumen rendering system, specifically for screen probe gathering and hair strand rendering. It is part of the Unreal Engine’s renderer module.

The value of this variable is set through the engine’s console variable system. It is initialized with a default value of 1 (enabled) and can be modified at runtime.

The associated C++ variable GLumenScreenProbeGatherHairStrands_VoxelTrace interacts directly with this console variable. They share the same value, and changes to one will affect the other.

Developers should be aware that:

  1. This variable affects the rendering performance and visual quality of hair shadows on opaque surfaces.
  2. It is specific to the voxel-based hair rendering technique in Lumen.
  3. It is a scalability option, meaning it can be adjusted based on performance requirements.

Best practices when using this variable include:

  1. Consider disabling it on lower-end hardware if performance is an issue.
  2. Test the visual impact of enabling/disabling this feature in scenes with significant hair rendering.
  3. Use in conjunction with other Lumen and hair rendering settings for optimal results.

Regarding the associated variable GLumenScreenProbeGatherHairStrands_VoxelTrace:

#References in C++ code

#Callsites

This variable is referenced in the following C++ source code:

#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenScreenProbeTracing.cpp:97

Scope: file

Source code excerpt:

int32 GLumenScreenProbeGatherHairStrands_VoxelTrace = 1;
FAutoConsoleVariableRef GVarLumenScreenProbeGatherHairStrands_VoxelTrace(
	TEXT("r.Lumen.ScreenProbeGather.HairStrands.VoxelTrace"),
	GLumenScreenProbeGatherHairStrands_VoxelTrace,
	TEXT("Whether to trace against hair voxel structure for hair casting shadow onto opaques."),
	ECVF_Scalability | ECVF_RenderThreadSafe
);

int32 GLumenScreenProbeGatherHairStrands_ScreenTrace = 0;

#Associated Variable and Callsites

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

#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenScreenProbeTracing.cpp:95

Scope: file

Source code excerpt:

);

int32 GLumenScreenProbeGatherHairStrands_VoxelTrace = 1;
FAutoConsoleVariableRef GVarLumenScreenProbeGatherHairStrands_VoxelTrace(
	TEXT("r.Lumen.ScreenProbeGather.HairStrands.VoxelTrace"),
	GLumenScreenProbeGatherHairStrands_VoxelTrace,
	TEXT("Whether to trace against hair voxel structure for hair casting shadow onto opaques."),
	ECVF_Scalability | ECVF_RenderThreadSafe
);

int32 GLumenScreenProbeGatherHairStrands_ScreenTrace = 0;
FAutoConsoleVariableRef GVarLumenScreenProbeGatherHairStrands_ScreenTrace(

#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenScreenProbeTracing.cpp:747

Scope (from outer to inner):

file
function     void TraceScreenProbes

Source code excerpt:

	}

	bool bNeedTraceHairVoxel = HairStrands::HasViewHairStrandsVoxelData(View) && GLumenScreenProbeGatherHairStrands_VoxelTrace > 0;
	const bool bUseHardwareRayTracing = Lumen::UseHardwareRayTracedScreenProbeGather(*View.Family);

	if (bUseHardwareRayTracing)
	{
		RenderHardwareRayTracingScreenProbe(
			GraphBuilder,