r.Lumen.IrradianceFieldGather.OcclusionProbeResolution

r.Lumen.IrradianceFieldGather.OcclusionProbeResolution

#Overview

name: r.Lumen.IrradianceFieldGather.OcclusionProbeResolution

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.IrradianceFieldGather.OcclusionProbeResolution is to control the resolution of the 2D occlusion layout for probes in Lumen’s Irradiance Field Gather system. This setting is part of Unreal Engine 5’s Lumen global illumination system, specifically related to the irradiance field gathering process.

This setting variable is primarily used by the Lumen subsystem within the Renderer module of Unreal Engine 5. It’s directly related to the irradiance field gathering process, which is a crucial part of Lumen’s global illumination calculations.

The value of this variable is set through the Unreal Engine console variable system. It’s initialized with a default value of 16 and can be modified at runtime using console commands or through project settings.

The associated variable GLumenIrradianceFieldProbeOcclusionResolution directly interacts with this setting. They share the same value, indicating that GLumenIrradianceFieldProbeOcclusionResolution is the internal representation of the console variable within the engine’s code.

Developers should be aware that changing this value affects the resolution of the occlusion probes used in the irradiance field gathering process. Higher values will increase the accuracy of occlusion calculations but may also increase performance costs.

Best practices when using this variable include:

  1. Balancing between visual quality and performance. Higher resolutions provide better occlusion accuracy but at the cost of increased computation.
  2. Testing different values to find the optimal setting for your specific scene and performance requirements.
  3. Considering the relationship between this setting and other Lumen settings, as they may interact to affect overall global illumination quality and performance.

Regarding the associated variable GLumenIrradianceFieldProbeOcclusionResolution:

This is an internal engine variable that directly corresponds to the r.Lumen.IrradianceFieldGather.OcclusionProbeResolution console variable. It’s used within the engine’s C++ code to actually apply the setting during rendering calculations.

The variable is defined in the Lumen subsystem of the Renderer module and is used in the SetupRadianceCacheInputs function to set the OcclusionProbeResolution parameter for radiance cache calculations.

Developers working directly with the engine’s C++ code should use this variable when they need to access or modify the occlusion probe resolution within rendering code. However, for most use cases, interacting with the console variable (r.Lumen.IrradianceFieldGather.OcclusionProbeResolution) is the recommended approach as it provides a standardized interface for adjusting the setting.

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenIrradianceFieldGather.cpp:79

Scope: file

Source code excerpt:

int32 GLumenIrradianceFieldProbeOcclusionResolution = 16;
FAutoConsoleVariableRef CVarLumenIrradianceFieldProbeOcclusionResolution(
	TEXT("r.Lumen.IrradianceFieldGather.OcclusionProbeResolution"),
	GLumenIrradianceFieldProbeOcclusionResolution,
	TEXT("Resolution of the probe's 2d occlusion layout."),
	ECVF_RenderThreadSafe
);

int32 GLumenIrradianceFieldNumMipmaps = 1;

#Associated Variable and Callsites

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

#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenIrradianceFieldGather.cpp:77

Scope: file

Source code excerpt:

);

int32 GLumenIrradianceFieldProbeOcclusionResolution = 16;
FAutoConsoleVariableRef CVarLumenIrradianceFieldProbeOcclusionResolution(
	TEXT("r.Lumen.IrradianceFieldGather.OcclusionProbeResolution"),
	GLumenIrradianceFieldProbeOcclusionResolution,
	TEXT("Resolution of the probe's 2d occlusion layout."),
	ECVF_RenderThreadSafe
);

int32 GLumenIrradianceFieldNumMipmaps = 1;
FAutoConsoleVariableRef CVarLumenIrradianceFieldNumMipmaps(

#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenIrradianceFieldGather.cpp:141

Scope (from outer to inner):

file
namespace    LumenIrradianceFieldGather
function     LumenRadianceCache::FRadianceCacheInputs SetupRadianceCacheInputs

Source code excerpt:

		Parameters.CalculateIrradiance = 1;
		Parameters.IrradianceProbeResolution = GLumenIrradianceFieldProbeIrradianceResolution;
		Parameters.OcclusionProbeResolution = GLumenIrradianceFieldProbeOcclusionResolution;
		Parameters.NumProbesToTraceBudget = GLumenIrradianceFieldNumProbesToTraceBudget;
		Parameters.RadianceCacheStats = GLumenIrradianceFieldStats;
		return Parameters;
	}
}