UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
LumenScreenProbeGather.cpp File Reference

Classes

class  FScreenProbeDownsampleDepthUniformCS
 
class  FScreenProbeAdaptivePlacementMarkCS
 
class  FScreenProbeAdaptivePlacementSpawnCS
 
class  FSetupAdaptiveProbeIndirectArgsCS
 
class  FMarkRadianceProbesUsedByScreenProbesCS
 
class  FMarkRadianceProbesUsedByHairStrandsCS
 
class  FInitScreenProbeTileIndirectArgsCS
 
class  FScreenProbeTileClassificationBuildListsCS
 
class  FScreenProbeIntegrateClearUnusedTileDataCS
 
class  FScreenProbeIntegrateCS
 
class  FScreenProbeTemporalReprojectionCS
 
class  FLumenScreenProbeSubstrateDebugPass
 
class  FScreenProbeGatherDebugCS
 

Namespaces

namespace  LumenScreenProbeGather
 
namespace  LumenScreenProbeGatherRadianceCache
 

Functions

FAutoConsoleVariableRef GVarLumenScreenProbeGather (TEXT("r.Lumen.ScreenProbeGather"), GLumenScreenProbeGather, TEXT("Whether to use the Screen Probe Final Gather"), ECVF_Scalability|ECVF_RenderThreadSafe)
 
FAutoConsoleVariableRef CVarLumenScreenProbeGatherTraceMeshSDFs (TEXT("r.Lumen.ScreenProbeGather.TraceMeshSDFs"), GLumenGatherCvars.TraceMeshSDFs, TEXT("Whether to trace against Mesh Signed Distance fields for Lumen's Screen Probe Gather."), ECVF_Scalability|ECVF_RenderThreadSafe)
 
FAutoConsoleVariableRef GVarAdaptiveProbeAllocationFraction (TEXT("r.Lumen.ScreenProbeGather.AdaptiveProbeAllocationFraction"), GLumenScreenProbeGatherAdaptiveProbeAllocationFraction, TEXT("Fraction of uniform probes to allow for adaptive probe placement."), ECVF_Scalability|ECVF_RenderThreadSafe)
 
FAutoConsoleVariableRef GVarLumenScreenProbeGatherReferenceMode (TEXT("r.Lumen.ScreenProbeGather.ReferenceMode"), GLumenScreenProbeGatherReferenceMode, TEXT("When enabled, traces 1024 uniform rays per probe with no filtering, Importance Sampling or Radiance Caching."), ECVF_Scalability|ECVF_RenderThreadSafe)
 
FAutoConsoleVariableRef GVarLumenScreenProbeTracingOctahedronResolution (TEXT("r.Lumen.ScreenProbeGather.TracingOctahedronResolution"), GLumenScreenProbeTracingOctahedronResolution, TEXT("Resolution of the tracing octahedron. Determines how many traces are done per probe."), ECVF_Scalability|ECVF_RenderThreadSafe)
 
FAutoConsoleVariableRef GVarLumenScreenProbeGatherOctahedronResolutionScale (TEXT("r.Lumen.ScreenProbeGather.GatherOctahedronResolutionScale"), GLumenScreenProbeGatherOctahedronResolutionScale, TEXT("Resolution that probe filtering and integration will happen at, as a scale of TracingOctahedronResolution"), ECVF_Scalability|ECVF_RenderThreadSafe)
 
FAutoConsoleVariableRef GVarLumenScreenProbeDownsampleFactor (TEXT("r.Lumen.ScreenProbeGather.DownsampleFactor"), GLumenScreenProbeDownsampleFactor, TEXT("Pixel size of the screen tile that a screen probe will be placed on."), ECVF_Scalability|ECVF_RenderThreadSafe)
 
FAutoConsoleVariableRef GVarLumenScreenProbeFullResolutionJitterWidth (TEXT("r.Lumen.ScreenProbeGather.FullResolutionJitterWidth"), GLumenScreenProbeFullResolutionJitterWidth, TEXT("Size of the full resolution jitter applied to Screen Probe upsampling, as a fraction of a screen tile. A width of 1 results in jittering by DownsampleFactor number of pixels."), ECVF_Scalability|ECVF_RenderThreadSafe)
 
FAutoConsoleVariableRef CVarLumenScreenProbeIntegrationTileClassification (TEXT("r.Lumen.ScreenProbeGather.IntegrationTileClassification"), GLumenScreenProbeIntegrationTileClassification, TEXT("Whether to use tile classification during diffuse integration. Tile Classification splits compute dispatches by VGPRs for better occupancy, but can introduce errors if implemented incorrectly."), ECVF_Scalability|ECVF_RenderThreadSafe)
 
FAutoConsoleVariableRef CVarLumenScreenProbeSupportBackfaceDiffuse (TEXT("r.Lumen.ScreenProbeGather.TwoSidedFoliageBackfaceDiffuse"), GLumenScreenProbeSupportTwoSidedFoliageBackfaceDiffuse, TEXT("Whether to gather lighting along the backface for the Two Sided Foliage shading model, which adds some GPU cost. The final lighting is then DiffuseColor * FrontfaceLighting + SubsurfaceColor * BackfaceLighting. When disabled, SubsurfaceColor will simply be added to DiffuseColor instead."), ECVF_Scalability|ECVF_RenderThreadSafe)
 
FAutoConsoleVariableRef CVarLumenScreenProbeDiffuseIntegralMethod (TEXT("r.Lumen.ScreenProbeGather.DiffuseIntegralMethod"), GLumenScreenProbeDiffuseIntegralMethod, TEXT("Preintegrated for probe (see IrradianceFormat) = 0, Importance Sample BRDF = 1, Numerical Integral Reference = 2"), ECVF_Scalability|ECVF_RenderThreadSafe)
 
FAutoConsoleVariableRef CVarLumenScreenProbeMaterialAO (TEXT("r.Lumen.ScreenProbeGather.MaterialAO"), GLumenScreenProbeMaterialAO, TEXT("Whether to apply Material Ambient Occlusion or Material Bent Normal to Lumen GI."), ECVF_Scalability|ECVF_RenderThreadSafe)
 
FAutoConsoleVariableRef CVarLumenScreenProbeTemporalFilter (TEXT("r.Lumen.ScreenProbeGather.Temporal"), GLumenScreenProbeTemporalFilter, TEXT("Whether to use a temporal filter"), ECVF_Scalability|ECVF_RenderThreadSafe)
 
FAutoConsoleVariableRef CVarLumenScreenProbeFractionOfLightingMovingForFastUpdateMode (TEXT("r.Lumen.ScreenProbeGather.Temporal.FractionOfLightingMovingForFastUpdateMode"), GLumenScreenProbeFractionOfLightingMovingForFastUpdateMode, TEXT(""), ECVF_Scalability|ECVF_RenderThreadSafe)
 
FAutoConsoleVariableRef CVarLumenScreenProbeTemporalMaxFastUpdateModeAmount (TEXT("r.Lumen.ScreenProbeGather.Temporal.MaxFastUpdateModeAmount"), GLumenScreenProbeTemporalMaxFastUpdateModeAmount, TEXT("Maximum amount of fast-responding temporal filter to use when traces hit a moving object. Values closer to 1 cause more noise, but also faster reaction to scene changes."), ECVF_Scalability|ECVF_RenderThreadSafe)
 
FAutoConsoleVariableRef CVarLumenScreenProbeTemporalFastUpdateModeUseNeighborhoodClamp (TEXT("r.Lumen.ScreenProbeGather.Temporal.FastUpdateModeUseNeighborhoodClamp"), GLumenScreenProbeTemporalFastUpdateModeUseNeighborhoodClamp, TEXT("Whether to clamp history values to the current frame's screen space neighborhood, in areas around moving objects."), ECVF_Scalability|ECVF_RenderThreadSafe)
 
FAutoConsoleVariableRef CVarLumenScreenProbeRelativeSpeedDifferenceToConsiderLightingMoving (TEXT("r.Lumen.ScreenProbeGather.Temporal.RelativeSpeedDifferenceToConsiderLightingMoving"), GLumenScreenProbeRelativeSpeedDifferenceToConsiderLightingMoving, TEXT(""), ECVF_Scalability|ECVF_RenderThreadSafe)
 
FAutoConsoleVariableRef CVarLumenScreenProbeTemporalMaxFramesAccumulated (TEXT("r.Lumen.ScreenProbeGather.Temporal.MaxFramesAccumulated"), GLumenScreenProbeTemporalMaxFramesAccumulated, TEXT("Lower values cause the temporal filter to propagate lighting changes faster, but also increase flickering from noise."), ECVF_Scalability|ECVF_RenderThreadSafe)
 
FAutoConsoleVariableRef CVarLumenScreenProbeTemporalHistoryNormalThreshold (TEXT("r.Lumen.ScreenProbeGather.Temporal.NormalThreshold"), GLumenScreenProbeTemporalHistoryNormalThreshold, TEXT("Maximum angle that the history texel's normal can be from the current pixel to accept it's history lighting, in degrees."), ECVF_Scalability|ECVF_RenderThreadSafe)
 
FAutoConsoleVariableRef CVarLumenScreenProbeScreenTracesThicknessScaleWhenNoFallback (TEXT("r.Lumen.ScreenProbeGather.ScreenTraces.ThicknessScaleWhenNoFallback"), GLumenScreenProbeScreenTracesThicknessScaleWhenNoFallback, TEXT("Larger scales effectively treat depth buffer surfaces as thicker for screen traces when there is no Distance Field present to resume the occluded ray."), ECVF_Scalability|ECVF_RenderThreadSafe)
 
FAutoConsoleVariableRef GVarLumenScreenProbeFilter (TEXT("r.Lumen.ScreenProbeGather.SpatialFilterProbes"), GLumenScreenProbeSpatialFilter, TEXT("Whether to spatially filter probe traces to reduce noise."), ECVF_Scalability|ECVF_RenderThreadSafe)
 
FAutoConsoleVariableRef GVarLumenScreenProbeTemporalFilter (TEXT("r.Lumen.ScreenProbeGather.TemporalFilterProbes"), GLumenScreenProbeTemporalFilterProbes, TEXT("Whether to temporally filter probe traces to reduce noise."), ECVF_Scalability|ECVF_RenderThreadSafe)
 
FAutoConsoleVariableRef GVarLumenScreenProbeExtraAmbientOcclusion (TEXT("r.Lumen.ScreenProbeGather.ExtraAmbientOcclusion"), GLumenScreenProbeExtraAmbientOcclusion, TEXT("1: Extra AO on"), ECVF_Scalability|ECVF_RenderThreadSafe)
 
FAutoConsoleVariableRef GVarLumenScreenProbeExtraAmbientOcclusionMaxDistanceWorldSpace (TEXT("r.Lumen.ScreenProbeGather.ExtraAmbientOcclusion.MaxDistanceWorldSpace"), GLumenScreenProbeExtraAmbientOcclusionMaxDistanceWorldSpace, TEXT("Maximum distance from the receiver surface that another surface in the world should cause ambient occlusion."), ECVF_Scalability|ECVF_RenderThreadSafe)
 
FAutoConsoleVariableRef GVarLumenScreenProbeExtraAmbientOcclusionExponent (TEXT("r.Lumen.ScreenProbeGather.ExtraAmbientOcclusion.Exponent"), GLumenScreenProbeExtraAmbientOcclusionExponent, TEXT("Exponent applied to the distance fraction of an occluder to calculate its occlusion. Values smaller than one reduce the occlusion of nearby objects, while values larger than one increase the occlusion of nearby objects."), ECVF_Scalability|ECVF_RenderThreadSafe)
 
FAutoConsoleVariableRef GVarLumenScreenSpaceShortRangeAO (TEXT("r.Lumen.ScreenProbeGather.ShortRangeAO"), GLumenShortRangeAmbientOcclusion, TEXT("Whether to compute a short range, full resolution AO to add high frequency occlusion (contact shadows) which Screen Probes lack due to downsampling."), ECVF_Scalability|ECVF_RenderThreadSafe)
 
FAutoConsoleVariableRef CVarLumenScreenProbeUseJitter (TEXT("r.Lumen.ScreenProbeGather.FixedJitterIndex"), GLumenScreenProbeFixedJitterIndex, TEXT("If zero or greater, overrides the temporal jitter index with a fixed index. Useful for debugging and inspecting sampling patterns."), ECVF_Scalability|ECVF_RenderThreadSafe)
 
FAutoConsoleVariableRef CVarRadianceCache (TEXT("r.Lumen.ScreenProbeGather.RadianceCache"), GLumenRadianceCache, TEXT("Whether to enable the Persistent world space Radiance Cache"), ECVF_Scalability|ECVF_RenderThreadSafe)
 
FAutoConsoleVariableRef CVarLumenScreenProbeIrradianceFormat (TEXT("r.Lumen.ScreenProbeGather.IrradianceFormat"), GLumenScreenProbeIrradianceFormat, TEXT("1 - Octahedral probe. Faster, but reverts to SH3 when ShortRangeAO.ApplyDuringIntegration is enabled together with BentNormal"), ECVF_Scalability|ECVF_RenderThreadSafe)
 
FAutoConsoleVariableRef CVarLumenScreenProbeStochasticInterpolation (TEXT("r.Lumen.ScreenProbeGather.StochasticInterpolation"), GLumenScreenProbeStochasticInterpolation, TEXT("Where to interpolate screen probes stochastically (1 sample) or bilinearly (4 samples)"), ECVF_Scalability|ECVF_RenderThreadSafe)
 
FAutoConsoleVariableRef GVarLumenScreenProbeTileDebugMode (TEXT("r.Lumen.ScreenProbeGather.TileDebugMode"), GLumenScreenProbeTileDebugMode, TEXT("Display Lumen screen probe tile classification."), ECVF_Scalability|ECVF_RenderThreadSafe)
 
bool SupportsHairScreenTraces ()
 
uint32 LumenScreenProbeGather::GetStateFrameIndex (const FSceneViewState *ViewState)
 
bool LumenScreenProbeGather::UseShortRangeAmbientOcclusion (const FEngineShowFlags &ShowFlags)
 
uint32 LumenScreenProbeGather::GetRequestedIntegrateDownsampleFactor ()
 
uint32 LumenScreenProbeGather::GetIntegrateDownsampleFactor (const FViewInfo &View)
 
bool LumenScreenProbeGather::IsUsingDownsampledDepthAndNormal (const FViewInfo &View)
 
int32 LumenScreenProbeGather::GetTracingOctahedronResolution (const FViewInfo &View)
 
int32 LumenScreenProbeGather::GetGatherOctahedronResolution (int32 TracingOctahedronResolution)
 
int32 LumenScreenProbeGather::GetScreenDownsampleFactor (const FViewInfo &View, const FSceneTextures &SceneTextures)
 
bool LumenScreenProbeGather::UseProbeSpatialFilter ()
 
bool LumenScreenProbeGather::UseProbeTemporalFilter ()
 
int32 LumenScreenProbeGather::GetDiffuseIntegralMethod ()
 
EScreenProbeIrradianceFormat LumenScreenProbeGather::GetScreenProbeIrradianceFormat (const FEngineShowFlags &ShowFlags)
 
bool LumenScreenProbeGather::UseScreenProbeExtraAO ()
 
float LumenScreenProbeGather::GetScreenProbeFullResolutionJitterWidth (const FViewInfo &View)
 
bool LumenScreenProbeGather::UseWaveOps (EShaderPlatform ShaderPlatform)
 
FIntPoint LumenScreenProbeGather::GetNumSamplesPerUniformProbe2D (uint32 NumSamplesPerUniformProbe)
 
FAutoConsoleVariableRef CVarRadianceCacheProbeResolution (TEXT("r.Lumen.ScreenProbeGather.RadianceCache.ProbeResolution"), GRadianceCacheProbeResolution, TEXT("Resolution of the probe's 2d radiance layout. The number of rays traced for the probe will be ProbeResolution ^ 2"), ECVF_Scalability|ECVF_RenderThreadSafe)
 
FAutoConsoleVariableRef CVarRadianceCacheNumMipmaps (TEXT("r.Lumen.ScreenProbeGather.RadianceCache.NumMipmaps"), GRadianceCacheNumMipmaps, TEXT("Number of radiance cache mipmaps."), ECVF_Scalability|ECVF_RenderThreadSafe)
 
int32 LumenScreenProbeGatherRadianceCache::GetNumClipmaps ()
 
int32 LumenScreenProbeGatherRadianceCache::GetClipmapGridResolution ()
 
int32 LumenScreenProbeGatherRadianceCache::GetProbeResolution ()
 
int32 LumenScreenProbeGatherRadianceCache::GetFinalProbeResolution ()
 
FIntVector LumenScreenProbeGatherRadianceCache::GetProbeIndirectionTextureSize ()
 
int32 LumenScreenProbeGatherRadianceCache::GetProbeAtlasResolutionInProbes ()
 
FIntPoint LumenScreenProbeGatherRadianceCache::GetProbeAtlasTextureSize ()
 
FIntPoint LumenScreenProbeGatherRadianceCache::GetFinalRadianceAtlasTextureSize ()
 
int32 LumenScreenProbeGatherRadianceCache::GetMaxNumProbes ()
 
LumenRadianceCache::FRadianceCacheInputs LumenScreenProbeGatherRadianceCache::SetupRadianceCacheInputs (const FViewInfo &View)
 
 IMPLEMENT_GLOBAL_SHADER (FScreenProbeDownsampleDepthUniformCS, "/Engine/Private/Lumen/LumenScreenProbeGather.usf", "ScreenProbeDownsampleDepthUniformCS", SF_Compute)
 
 IMPLEMENT_GLOBAL_SHADER (FScreenProbeAdaptivePlacementMarkCS, "/Engine/Private/Lumen/LumenScreenProbeGather.usf", "ScreenProbeAdaptivePlacementMarkCS", SF_Compute)
 
 IMPLEMENT_GLOBAL_SHADER (FScreenProbeAdaptivePlacementSpawnCS, "/Engine/Private/Lumen/LumenScreenProbeGather.usf", "ScreenProbeAdaptivePlacementSpawnCS", SF_Compute)
 
 IMPLEMENT_GLOBAL_SHADER (FSetupAdaptiveProbeIndirectArgsCS, "/Engine/Private/Lumen/LumenScreenProbeGather.usf", "SetupAdaptiveProbeIndirectArgsCS", SF_Compute)
 
 IMPLEMENT_GLOBAL_SHADER (FMarkRadianceProbesUsedByScreenProbesCS, "/Engine/Private/Lumen/LumenScreenProbeGather.usf", "MarkRadianceProbesUsedByScreenProbesCS", SF_Compute)
 
 IMPLEMENT_GLOBAL_SHADER (FMarkRadianceProbesUsedByHairStrandsCS, "/Engine/Private/Lumen/LumenScreenProbeGather.usf", "MarkRadianceProbesUsedByHairStrandsCS", SF_Compute)
 
 IMPLEMENT_GLOBAL_SHADER (FInitScreenProbeTileIndirectArgsCS, "/Engine/Private/Lumen/LumenScreenProbeGather.usf", "InitScreenProbeTileIndirectArgsCS", SF_Compute)
 
 IMPLEMENT_GLOBAL_SHADER (FScreenProbeTileClassificationBuildListsCS, "/Engine/Private/Lumen/LumenScreenProbeGather.usf", "ScreenProbeTileClassificationBuildListsCS", SF_Compute)
 
 IMPLEMENT_GLOBAL_SHADER (FScreenProbeIntegrateClearUnusedTileDataCS, "/Engine/Private/Lumen/LumenScreenProbeGather.usf", "ScreenProbeIntegrateClearUnusedTileDataCS", SF_Compute)
 
 IMPLEMENT_GLOBAL_SHADER (FScreenProbeIntegrateCS, "/Engine/Private/Lumen/LumenScreenProbeGather.usf", "ScreenProbeIntegrateCS", SF_Compute)
 
 IMPLEMENT_GLOBAL_SHADER (FScreenProbeTemporalReprojectionCS, "/Engine/Private/Lumen/LumenScreenProbeGatherTemporal.usf", "ScreenProbeTemporalReprojectionCS", SF_Compute)
 
 IMPLEMENT_GLOBAL_SHADER (FLumenScreenProbeSubstrateDebugPass, "/Engine/Private/Lumen/LumenScreenProbeGather.usf", "ScreenProbeDebugMain", SF_Compute)
 
 IMPLEMENT_GLOBAL_SHADER (FScreenProbeGatherDebugCS, "/Engine/Private/Lumen/LumenScreenProbeDebug.usf", "ScreenProbeGatherDebugCS", SF_Compute)
 
void AddLumenScreenProbeDebugPass (FRDGBuilder &GraphBuilder, FViewInfo &View, const FIntPoint &ViewportIntegrateTileDimensions, const FIntPoint &ViewportIntegrateTileDimensionsWithOverflow, FRDGBufferRef IntegrateTileData, FRDGBufferRef IntegrateIndirectArgs)
 
const TCHARGetClassificationModeString (EScreenProbeIntegrateTileClassification Mode)
 
void InterpolateAndIntegrate (FRDGBuilder &GraphBuilder, const FSceneTextures &SceneTextures, FViewInfo &View, const FLumenSceneFrameTemporaries &FrameTemporaries, const FScreenProbeParameters &ScreenProbeParameters, const FScreenProbeGatherParameters &GatherParameters, FScreenProbeIntegrateParameters &IntegrateParameters, const FLumenScreenSpaceBentNormalParameters &ScreenSpaceBentNormalParameters, EReflectionsMethod ReflectionsMethod, FRDGTextureRef DiffuseIndirect, FRDGTextureRef LightIsMoving, FRDGTextureRef BackfaceDiffuseIndirect, FRDGTextureRef RoughSpecularIndirect, ERDGPassFlags ComputePassFlags)
 
void UpdateHistoryScreenProbeGather (FRDGBuilder &GraphBuilder, const FViewInfo &View, const FSceneTextures &SceneTextures, FLumenSceneFrameTemporaries &FrameTemporaries, const FScreenProbeGatherCommonParameters &ScreenProbeGatherCommonParameters, const FScreenProbeIntegrateParameters &IntegrateParameters, FLumenScreenSpaceBentNormalParameters &ScreenSpaceBentNormalParameters, bool bPropagateGlobalLightingChange, FRDGTextureRef &DiffuseIndirect, FRDGTextureRef LightIsMoving, FRDGTextureRef &BackfaceDiffuseIndirect, FRDGTextureRef &RoughSpecularIndirect, ERDGPassFlags ComputePassFlags)
 
 DECLARE_GPU_STAT (LumenScreenProbeGather)
 

Variables

FLumenGatherCvarState GLumenGatherCvars
 
int32 GLumenScreenProbeGather = 1
 
float GLumenScreenProbeGatherAdaptiveProbeAllocationFraction = .5f
 
int32 GLumenScreenProbeGatherReferenceMode = 0
 
int32 GLumenScreenProbeTracingOctahedronResolution = 8
 
float GLumenScreenProbeGatherOctahedronResolutionScale = 1.0f
 
int32 GLumenScreenProbeDownsampleFactor = 16
 
float GLumenScreenProbeFullResolutionJitterWidth = 1
 
int32 GLumenScreenProbeIntegrationTileClassification = 1
 
int32 GLumenScreenProbeSupportTwoSidedFoliageBackfaceDiffuse = 1
 
int32 GLumenScreenProbeDiffuseIntegralMethod = 0
 
int32 GLumenScreenProbeMaterialAO = 1
 
TAutoConsoleVariable< floatCVarLumenScreenProbeInterpolationDepthWeight (TEXT("r.Lumen.ScreenProbeGather.InterpolationDepthWeight"), 1.0f, TEXT("Higher values will make lighting sharper on small elements, but somewhat less stable and will spawn more adaptive probes."), ECVF_Scalability|ECVF_RenderThreadSafe)
 
TAutoConsoleVariable< floatCVarLumenScreenProbeInterpolationDepthWeightForFoliage (TEXT("r.Lumen.ScreenProbeGather.InterpolationDepthWeightForFoliage"), 0.25f, TEXT("Usually can be relaxed on foliage in order to spawn less adaptive probes, as light leaking is less visible on foliage."), ECVF_Scalability|ECVF_RenderThreadSafe)
 
int32 GLumenScreenProbeTemporalFilter = 1
 
int32 GLumenScreenProbeClearHistoryEveryFrame = 0
 
FAutoConsoleVariableRef CVarLumenScreenProbeClearHistoryEveryFrame (TEXT("r.Lumen.ScreenProbeGather.Temporal.ClearHistoryEveryFrame"), GLumenScreenProbeClearHistoryEveryFrame, TEXT("Whether to clear the history every frame for debugging"), ECVF_RenderThreadSafe)
 
TAutoConsoleVariable< floatCVarLumenScreenProbeHistoryDistanceThreshold (TEXT("r.Lumen.ScreenProbeGather.Temporal.DistanceThreshold"), 0.01f, TEXT("Relative distance threshold needed to discard last frame's lighting results. Lower values reduce ghosting from characters when near a wall but increase flickering artifacts."), ECVF_Scalability|ECVF_RenderThreadSafe)
 
TAutoConsoleVariable< floatCVarLumenScreenProbeHistoryDistanceThresholdForFoliage (TEXT("r.Lumen.ScreenProbeGather.Temporal.DistanceThresholdForFoliage"), 0.03f, TEXT("r.Lumen.ScreenProbeGather.Temporal.DistanceThreshold which only affects foliage pixels. Often foliage has lots of discontinuities and edges and it's beneficial to be more agressive with keeping history there."), ECVF_Scalability|ECVF_RenderThreadSafe)
 
float GLumenScreenProbeFractionOfLightingMovingForFastUpdateMode = .1f
 
float GLumenScreenProbeTemporalMaxFastUpdateModeAmount = .9f
 
int32 GLumenScreenProbeTemporalFastUpdateModeUseNeighborhoodClamp = 0
 
float GLumenScreenProbeRelativeSpeedDifferenceToConsiderLightingMoving = .005f
 
float GLumenScreenProbeTemporalMaxFramesAccumulated = 10.0f
 
TAutoConsoleVariable< int32CVarLumenScreenProbeTemporalMaxRayDirections (TEXT("r.Lumen.ScreenProbeGather.Temporal.MaxRayDirections"), 8, TEXT("Number of possible random directions per pixel. Should be tweaked based on MaxFramesAccumulated."), ECVF_Scalability|ECVF_RenderThreadSafe)
 
float GLumenScreenProbeTemporalHistoryNormalThreshold = 45.0f
 
float GLumenScreenProbeScreenTracesThicknessScaleWhenNoFallback = 2
 
int32 GLumenScreenProbeSpatialFilter = 1
 
int32 GLumenScreenProbeTemporalFilterProbes = 0
 
int32 GLumenScreenProbeExtraAmbientOcclusion = 0
 
float GLumenScreenProbeExtraAmbientOcclusionMaxDistanceWorldSpace = 500.0f
 
float GLumenScreenProbeExtraAmbientOcclusionExponent = .5f
 
int32 GLumenShortRangeAmbientOcclusion = 1
 
int32 GLumenScreenProbeFixedJitterIndex = -1
 
int32 GLumenRadianceCache = 1
 
int32 GLumenScreenProbeIrradianceFormat = 1
 
int32 GLumenScreenProbeStochasticInterpolation = 1
 
int32 GLumenScreenProbeTileDebugMode = 0
 
const FIntPoint LumenScreenProbeGather::AdaptiveSamplesPerPassXY (2, 2)
 
int32 GRadianceCacheNumClipmaps = 4
 
FAutoConsoleVariableRef CVarRadianceCacheNumClipmaps (TEXT("r.Lumen.ScreenProbeGather.RadianceCache.NumClipmaps"), GRadianceCacheNumClipmaps, TEXT("Number of radiance cache clipmaps."), ECVF_RenderThreadSafe)
 
float GLumenRadianceCacheClipmapWorldExtent = 2500.0f
 
FAutoConsoleVariableRef CVarLumenRadianceCacheClipmapWorldExtent (TEXT("r.Lumen.ScreenProbeGather.RadianceCache.ClipmapWorldExtent"), GLumenRadianceCacheClipmapWorldExtent, TEXT("World space extent of the first clipmap"), ECVF_RenderThreadSafe)
 
float GLumenRadianceCacheClipmapDistributionBase = 2.0f
 
FAutoConsoleVariableRef CVarLumenRadianceCacheClipmapDistributionBase (TEXT("r.Lumen.ScreenProbeGather.RadianceCache.ClipmapDistributionBase"), GLumenRadianceCacheClipmapDistributionBase, TEXT("Base of the Pow() that controls the size of each successive clipmap relative to the first."), ECVF_RenderThreadSafe)
 
int32 GRadianceCacheGridResolution = 48
 
FAutoConsoleVariableRef CVarRadianceCacheResolution (TEXT("r.Lumen.ScreenProbeGather.RadianceCache.GridResolution"), GRadianceCacheGridResolution, TEXT("Resolution of the probe placement grid within each clipmap"), ECVF_RenderThreadSafe)
 
int32 GRadianceCacheProbeResolution = 32
 
int32 GRadianceCacheNumMipmaps = 1
 
float GRadianceCacheReprojectionRadiusScale = 1.5f
 
FAutoConsoleVariableRef CVarRadianceCacheProbeReprojectionRadiusScale (TEXT("r.Lumen.ScreenProbeGather.RadianceCache.ReprojectionRadiusScale"), GRadianceCacheReprojectionRadiusScale, TEXT(""), ECVF_RenderThreadSafe)
 
int32 GRadianceCacheStats = 0
 
FAutoConsoleVariableRef CVarRadianceCacheStats (TEXT("r.Lumen.ScreenProbeGather.RadianceCache.Stats"), GRadianceCacheStats, TEXT("GPU print out Radiance Cache update stats."), ECVF_RenderThreadSafe)
 
const int32 GScreenProbeIntegrateTileSize = 8
 
float GLumenMaxShortRangeAOMultibounceAlbedo
 

Function Documentation

◆ AddLumenScreenProbeDebugPass()

void AddLumenScreenProbeDebugPass ( FRDGBuilder GraphBuilder,
FViewInfo View,
const FIntPoint ViewportIntegrateTileDimensions,
const FIntPoint ViewportIntegrateTileDimensionsWithOverflow,
FRDGBufferRef  IntegrateTileData,
FRDGBufferRef  IntegrateIndirectArgs 
)

◆ CVarLumenScreenProbeDiffuseIntegralMethod()

FAutoConsoleVariableRef CVarLumenScreenProbeDiffuseIntegralMethod ( TEXT("r.Lumen.ScreenProbeGather.DiffuseIntegralMethod")  ,
GLumenScreenProbeDiffuseIntegralMethod  ,
TEXT("Preintegrated for probe (see IrradianceFormat) = 0, Importance Sample BRDF = 1, Numerical Integral Reference = 2")  ,
ECVF_Scalability ECVF_RenderThreadSafe 
)

◆ CVarLumenScreenProbeFractionOfLightingMovingForFastUpdateMode()

FAutoConsoleVariableRef CVarLumenScreenProbeFractionOfLightingMovingForFastUpdateMode ( TEXT("r.Lumen.ScreenProbeGather.Temporal.FractionOfLightingMovingForFastUpdateMode")  ,
GLumenScreenProbeFractionOfLightingMovingForFastUpdateMode  ,
TEXT("")  ,
ECVF_Scalability ECVF_RenderThreadSafe 
)

◆ CVarLumenScreenProbeGatherTraceMeshSDFs()

FAutoConsoleVariableRef CVarLumenScreenProbeGatherTraceMeshSDFs ( TEXT("r.Lumen.ScreenProbeGather.TraceMeshSDFs")  ,
GLumenGatherCvars.  TraceMeshSDFs,
TEXT("Whether to trace against Mesh Signed Distance fields for Lumen's Screen Probe Gather." ,
ECVF_Scalability ECVF_RenderThreadSafe 
)

◆ CVarLumenScreenProbeIntegrationTileClassification()

FAutoConsoleVariableRef CVarLumenScreenProbeIntegrationTileClassification ( TEXT("r.Lumen.ScreenProbeGather.IntegrationTileClassification")  ,
GLumenScreenProbeIntegrationTileClassification  ,
TEXT("Whether to use tile classification during diffuse integration. Tile Classification splits compute dispatches by VGPRs for better occupancy, but can introduce errors if implemented incorrectly." ,
ECVF_Scalability ECVF_RenderThreadSafe 
)

◆ CVarLumenScreenProbeIrradianceFormat()

FAutoConsoleVariableRef CVarLumenScreenProbeIrradianceFormat ( TEXT("r.Lumen.ScreenProbeGather.IrradianceFormat")  ,
GLumenScreenProbeIrradianceFormat  ,
TEXT("1 - Octahedral probe. Faster, but reverts to SH3 when ShortRangeAO.ApplyDuringIntegration is enabled together with BentNormal" ,
ECVF_Scalability ECVF_RenderThreadSafe 
)

◆ CVarLumenScreenProbeMaterialAO()

FAutoConsoleVariableRef CVarLumenScreenProbeMaterialAO ( TEXT("r.Lumen.ScreenProbeGather.MaterialAO")  ,
GLumenScreenProbeMaterialAO  ,
TEXT("Whether to apply Material Ambient Occlusion or Material Bent Normal to Lumen GI." ,
ECVF_Scalability ECVF_RenderThreadSafe 
)

◆ CVarLumenScreenProbeRelativeSpeedDifferenceToConsiderLightingMoving()

FAutoConsoleVariableRef CVarLumenScreenProbeRelativeSpeedDifferenceToConsiderLightingMoving ( TEXT("r.Lumen.ScreenProbeGather.Temporal.RelativeSpeedDifferenceToConsiderLightingMoving")  ,
GLumenScreenProbeRelativeSpeedDifferenceToConsiderLightingMoving  ,
TEXT("")  ,
ECVF_Scalability ECVF_RenderThreadSafe 
)

◆ CVarLumenScreenProbeScreenTracesThicknessScaleWhenNoFallback()

FAutoConsoleVariableRef CVarLumenScreenProbeScreenTracesThicknessScaleWhenNoFallback ( TEXT("r.Lumen.ScreenProbeGather.ScreenTraces.ThicknessScaleWhenNoFallback")  ,
GLumenScreenProbeScreenTracesThicknessScaleWhenNoFallback  ,
TEXT("Larger scales effectively treat depth buffer surfaces as thicker for screen traces when there is no Distance Field present to resume the occluded ray." ,
ECVF_Scalability ECVF_RenderThreadSafe 
)

◆ CVarLumenScreenProbeStochasticInterpolation()

FAutoConsoleVariableRef CVarLumenScreenProbeStochasticInterpolation ( TEXT("r.Lumen.ScreenProbeGather.StochasticInterpolation")  ,
GLumenScreenProbeStochasticInterpolation  ,
TEXT("Where to interpolate screen probes stochastically (1 sample) or bilinearly (4 samples)")  ,
ECVF_Scalability ECVF_RenderThreadSafe 
)

◆ CVarLumenScreenProbeSupportBackfaceDiffuse()

FAutoConsoleVariableRef CVarLumenScreenProbeSupportBackfaceDiffuse ( TEXT("r.Lumen.ScreenProbeGather.TwoSidedFoliageBackfaceDiffuse")  ,
GLumenScreenProbeSupportTwoSidedFoliageBackfaceDiffuse  ,
TEXT("Whether to gather lighting along the backface for the Two Sided Foliage shading model, which adds some GPU cost. The final lighting is then DiffuseColor * FrontfaceLighting + SubsurfaceColor * BackfaceLighting. When disabled, SubsurfaceColor will simply be added to DiffuseColor instead." ,
ECVF_Scalability ECVF_RenderThreadSafe 
)

◆ CVarLumenScreenProbeTemporalFastUpdateModeUseNeighborhoodClamp()

FAutoConsoleVariableRef CVarLumenScreenProbeTemporalFastUpdateModeUseNeighborhoodClamp ( TEXT("r.Lumen.ScreenProbeGather.Temporal.FastUpdateModeUseNeighborhoodClamp")  ,
GLumenScreenProbeTemporalFastUpdateModeUseNeighborhoodClamp  ,
TEXT("Whether to clamp history values to the current frame's screen space neighborhood, in areas around moving objects." ,
ECVF_Scalability ECVF_RenderThreadSafe 
)

◆ CVarLumenScreenProbeTemporalFilter()

FAutoConsoleVariableRef CVarLumenScreenProbeTemporalFilter ( TEXT("r.Lumen.ScreenProbeGather.Temporal")  ,
GLumenScreenProbeTemporalFilter  ,
TEXT("Whether to use a temporal filter" ,
ECVF_Scalability ECVF_RenderThreadSafe 
)

◆ CVarLumenScreenProbeTemporalHistoryNormalThreshold()

FAutoConsoleVariableRef CVarLumenScreenProbeTemporalHistoryNormalThreshold ( TEXT("r.Lumen.ScreenProbeGather.Temporal.NormalThreshold")  ,
GLumenScreenProbeTemporalHistoryNormalThreshold  ,
TEXT("Maximum angle that the history texel's normal can be from the current pixel to accept it's history lighting, in degrees." ,
ECVF_Scalability ECVF_RenderThreadSafe 
)

◆ CVarLumenScreenProbeTemporalMaxFastUpdateModeAmount()

FAutoConsoleVariableRef CVarLumenScreenProbeTemporalMaxFastUpdateModeAmount ( TEXT("r.Lumen.ScreenProbeGather.Temporal.MaxFastUpdateModeAmount")  ,
GLumenScreenProbeTemporalMaxFastUpdateModeAmount  ,
TEXT("Maximum amount of fast-responding temporal filter to use when traces hit a moving object. Values closer to 1 cause more noise, but also faster reaction to scene changes." ,
ECVF_Scalability ECVF_RenderThreadSafe 
)

◆ CVarLumenScreenProbeTemporalMaxFramesAccumulated()

FAutoConsoleVariableRef CVarLumenScreenProbeTemporalMaxFramesAccumulated ( TEXT("r.Lumen.ScreenProbeGather.Temporal.MaxFramesAccumulated")  ,
GLumenScreenProbeTemporalMaxFramesAccumulated  ,
TEXT("Lower values cause the temporal filter to propagate lighting changes faster, but also increase flickering from noise." ,
ECVF_Scalability ECVF_RenderThreadSafe 
)

◆ CVarLumenScreenProbeUseJitter()

FAutoConsoleVariableRef CVarLumenScreenProbeUseJitter ( TEXT("r.Lumen.ScreenProbeGather.FixedJitterIndex")  ,
GLumenScreenProbeFixedJitterIndex  ,
TEXT("If zero or greater, overrides the temporal jitter index with a fixed index. Useful for debugging and inspecting sampling patterns." ,
ECVF_Scalability ECVF_RenderThreadSafe 
)

◆ CVarRadianceCache()

FAutoConsoleVariableRef CVarRadianceCache ( TEXT("r.Lumen.ScreenProbeGather.RadianceCache")  ,
GLumenRadianceCache  ,
TEXT("Whether to enable the Persistent world space Radiance Cache" ,
ECVF_Scalability ECVF_RenderThreadSafe 
)

◆ CVarRadianceCacheNumMipmaps()

FAutoConsoleVariableRef CVarRadianceCacheNumMipmaps ( TEXT("r.Lumen.ScreenProbeGather.RadianceCache.NumMipmaps")  ,
GRadianceCacheNumMipmaps  ,
TEXT("Number of radiance cache mipmaps." ,
ECVF_Scalability ECVF_RenderThreadSafe 
)

◆ CVarRadianceCacheProbeResolution()

FAutoConsoleVariableRef CVarRadianceCacheProbeResolution ( TEXT("r.Lumen.ScreenProbeGather.RadianceCache.ProbeResolution")  ,
GRadianceCacheProbeResolution  ,
TEXT("Resolution of the probe's 2d radiance layout. The number of rays traced for the probe will be ProbeResolution ^ 2")  ,
ECVF_Scalability ECVF_RenderThreadSafe 
)

◆ DECLARE_GPU_STAT()

DECLARE_GPU_STAT ( LumenScreenProbeGather  )

◆ GetClassificationModeString()

const TCHAR * GetClassificationModeString ( EScreenProbeIntegrateTileClassification  Mode)

◆ GVarAdaptiveProbeAllocationFraction()

FAutoConsoleVariableRef GVarAdaptiveProbeAllocationFraction ( TEXT("r.Lumen.ScreenProbeGather.AdaptiveProbeAllocationFraction")  ,
GLumenScreenProbeGatherAdaptiveProbeAllocationFraction  ,
TEXT("Fraction of uniform probes to allow for adaptive probe placement." ,
ECVF_Scalability ECVF_RenderThreadSafe 
)

◆ GVarLumenScreenProbeDownsampleFactor()

FAutoConsoleVariableRef GVarLumenScreenProbeDownsampleFactor ( TEXT("r.Lumen.ScreenProbeGather.DownsampleFactor")  ,
GLumenScreenProbeDownsampleFactor  ,
TEXT("Pixel size of the screen tile that a screen probe will be placed on." ,
ECVF_Scalability ECVF_RenderThreadSafe 
)

◆ GVarLumenScreenProbeExtraAmbientOcclusion()

FAutoConsoleVariableRef GVarLumenScreenProbeExtraAmbientOcclusion ( TEXT("r.Lumen.ScreenProbeGather.ExtraAmbientOcclusion")  ,
GLumenScreenProbeExtraAmbientOcclusion  ,
TEXT("1: Extra AO on" ,
ECVF_Scalability ECVF_RenderThreadSafe 
)

◆ GVarLumenScreenProbeExtraAmbientOcclusionExponent()

FAutoConsoleVariableRef GVarLumenScreenProbeExtraAmbientOcclusionExponent ( TEXT("r.Lumen.ScreenProbeGather.ExtraAmbientOcclusion.Exponent")  ,
GLumenScreenProbeExtraAmbientOcclusionExponent  ,
TEXT("Exponent applied to the distance fraction of an occluder to calculate its occlusion. Values smaller than one reduce the occlusion of nearby objects, while values larger than one increase the occlusion of nearby objects." ,
ECVF_Scalability ECVF_RenderThreadSafe 
)

◆ GVarLumenScreenProbeExtraAmbientOcclusionMaxDistanceWorldSpace()

FAutoConsoleVariableRef GVarLumenScreenProbeExtraAmbientOcclusionMaxDistanceWorldSpace ( TEXT("r.Lumen.ScreenProbeGather.ExtraAmbientOcclusion.MaxDistanceWorldSpace")  ,
GLumenScreenProbeExtraAmbientOcclusionMaxDistanceWorldSpace  ,
TEXT("Maximum distance from the receiver surface that another surface in the world should cause ambient occlusion." ,
ECVF_Scalability ECVF_RenderThreadSafe 
)

◆ GVarLumenScreenProbeFilter()

FAutoConsoleVariableRef GVarLumenScreenProbeFilter ( TEXT("r.Lumen.ScreenProbeGather.SpatialFilterProbes")  ,
GLumenScreenProbeSpatialFilter  ,
TEXT("Whether to spatially filter probe traces to reduce noise." ,
ECVF_Scalability ECVF_RenderThreadSafe 
)

◆ GVarLumenScreenProbeFullResolutionJitterWidth()

FAutoConsoleVariableRef GVarLumenScreenProbeFullResolutionJitterWidth ( TEXT("r.Lumen.ScreenProbeGather.FullResolutionJitterWidth")  ,
GLumenScreenProbeFullResolutionJitterWidth  ,
TEXT("Size of the full resolution jitter applied to Screen Probe upsampling, as a fraction of a screen tile. A width of 1 results in jittering by DownsampleFactor number of pixels." ,
ECVF_Scalability ECVF_RenderThreadSafe 
)

◆ GVarLumenScreenProbeGather()

FAutoConsoleVariableRef GVarLumenScreenProbeGather ( TEXT("r.Lumen.ScreenProbeGather")  ,
GLumenScreenProbeGather  ,
TEXT("Whether to use the Screen Probe Final Gather" ,
ECVF_Scalability ECVF_RenderThreadSafe 
)

◆ GVarLumenScreenProbeGatherOctahedronResolutionScale()

FAutoConsoleVariableRef GVarLumenScreenProbeGatherOctahedronResolutionScale ( TEXT("r.Lumen.ScreenProbeGather.GatherOctahedronResolutionScale")  ,
GLumenScreenProbeGatherOctahedronResolutionScale  ,
TEXT("Resolution that probe filtering and integration will happen at, as a scale of TracingOctahedronResolution" ,
ECVF_Scalability ECVF_RenderThreadSafe 
)

◆ GVarLumenScreenProbeGatherReferenceMode()

FAutoConsoleVariableRef GVarLumenScreenProbeGatherReferenceMode ( TEXT("r.Lumen.ScreenProbeGather.ReferenceMode")  ,
GLumenScreenProbeGatherReferenceMode  ,
TEXT("When enabled, traces 1024 uniform rays per probe with no filtering, Importance Sampling or Radiance Caching." ,
ECVF_Scalability ECVF_RenderThreadSafe 
)

◆ GVarLumenScreenProbeTemporalFilter()

FAutoConsoleVariableRef GVarLumenScreenProbeTemporalFilter ( TEXT("r.Lumen.ScreenProbeGather.TemporalFilterProbes")  ,
GLumenScreenProbeTemporalFilterProbes  ,
TEXT("Whether to temporally filter probe traces to reduce noise." ,
ECVF_Scalability ECVF_RenderThreadSafe 
)

◆ GVarLumenScreenProbeTileDebugMode()

FAutoConsoleVariableRef GVarLumenScreenProbeTileDebugMode ( TEXT("r.Lumen.ScreenProbeGather.TileDebugMode")  ,
GLumenScreenProbeTileDebugMode  ,
TEXT("Display Lumen screen probe tile classification." ,
ECVF_Scalability ECVF_RenderThreadSafe 
)

◆ GVarLumenScreenProbeTracingOctahedronResolution()

FAutoConsoleVariableRef GVarLumenScreenProbeTracingOctahedronResolution ( TEXT("r.Lumen.ScreenProbeGather.TracingOctahedronResolution")  ,
GLumenScreenProbeTracingOctahedronResolution  ,
TEXT("Resolution of the tracing octahedron. Determines how many traces are done per probe." ,
ECVF_Scalability ECVF_RenderThreadSafe 
)

◆ GVarLumenScreenSpaceShortRangeAO()

FAutoConsoleVariableRef GVarLumenScreenSpaceShortRangeAO ( TEXT("r.Lumen.ScreenProbeGather.ShortRangeAO")  ,
GLumenShortRangeAmbientOcclusion  ,
TEXT("Whether to compute a short range, full resolution AO to add high frequency occlusion (contact shadows) which Screen Probes lack due to downsampling." ,
ECVF_Scalability ECVF_RenderThreadSafe 
)

◆ IMPLEMENT_GLOBAL_SHADER() [1/13]

IMPLEMENT_GLOBAL_SHADER ( FInitScreenProbeTileIndirectArgsCS  ,
"/Engine/Private/Lumen/LumenScreenProbeGather.usf"  ,
"InitScreenProbeTileIndirectArgsCS"  ,
SF_Compute   
)

◆ IMPLEMENT_GLOBAL_SHADER() [2/13]

IMPLEMENT_GLOBAL_SHADER ( FLumenScreenProbeSubstrateDebugPass  ,
"/Engine/Private/Lumen/LumenScreenProbeGather.usf"  ,
"ScreenProbeDebugMain"  ,
SF_Compute   
)

◆ IMPLEMENT_GLOBAL_SHADER() [3/13]

IMPLEMENT_GLOBAL_SHADER ( FMarkRadianceProbesUsedByHairStrandsCS  ,
"/Engine/Private/Lumen/LumenScreenProbeGather.usf"  ,
"MarkRadianceProbesUsedByHairStrandsCS"  ,
SF_Compute   
)

◆ IMPLEMENT_GLOBAL_SHADER() [4/13]

IMPLEMENT_GLOBAL_SHADER ( FMarkRadianceProbesUsedByScreenProbesCS  ,
"/Engine/Private/Lumen/LumenScreenProbeGather.usf"  ,
"MarkRadianceProbesUsedByScreenProbesCS"  ,
SF_Compute   
)

◆ IMPLEMENT_GLOBAL_SHADER() [5/13]

IMPLEMENT_GLOBAL_SHADER ( FScreenProbeAdaptivePlacementMarkCS  ,
"/Engine/Private/Lumen/LumenScreenProbeGather.usf"  ,
"ScreenProbeAdaptivePlacementMarkCS"  ,
SF_Compute   
)

◆ IMPLEMENT_GLOBAL_SHADER() [6/13]

IMPLEMENT_GLOBAL_SHADER ( FScreenProbeAdaptivePlacementSpawnCS  ,
"/Engine/Private/Lumen/LumenScreenProbeGather.usf"  ,
"ScreenProbeAdaptivePlacementSpawnCS"  ,
SF_Compute   
)

◆ IMPLEMENT_GLOBAL_SHADER() [7/13]

IMPLEMENT_GLOBAL_SHADER ( FScreenProbeDownsampleDepthUniformCS  ,
"/Engine/Private/Lumen/LumenScreenProbeGather.usf"  ,
"ScreenProbeDownsampleDepthUniformCS"  ,
SF_Compute   
)

◆ IMPLEMENT_GLOBAL_SHADER() [8/13]

IMPLEMENT_GLOBAL_SHADER ( FScreenProbeGatherDebugCS  ,
"/Engine/Private/Lumen/LumenScreenProbeDebug.usf"  ,
"ScreenProbeGatherDebugCS"  ,
SF_Compute   
)

◆ IMPLEMENT_GLOBAL_SHADER() [9/13]

IMPLEMENT_GLOBAL_SHADER ( FScreenProbeIntegrateClearUnusedTileDataCS  ,
"/Engine/Private/Lumen/LumenScreenProbeGather.usf"  ,
"ScreenProbeIntegrateClearUnusedTileDataCS"  ,
SF_Compute   
)

◆ IMPLEMENT_GLOBAL_SHADER() [10/13]

IMPLEMENT_GLOBAL_SHADER ( FScreenProbeIntegrateCS  ,
"/Engine/Private/Lumen/LumenScreenProbeGather.usf"  ,
"ScreenProbeIntegrateCS"  ,
SF_Compute   
)

◆ IMPLEMENT_GLOBAL_SHADER() [11/13]

IMPLEMENT_GLOBAL_SHADER ( FScreenProbeTemporalReprojectionCS  ,
"/Engine/Private/Lumen/LumenScreenProbeGatherTemporal.usf"  ,
"ScreenProbeTemporalReprojectionCS"  ,
SF_Compute   
)

◆ IMPLEMENT_GLOBAL_SHADER() [12/13]

IMPLEMENT_GLOBAL_SHADER ( FScreenProbeTileClassificationBuildListsCS  ,
"/Engine/Private/Lumen/LumenScreenProbeGather.usf"  ,
"ScreenProbeTileClassificationBuildListsCS"  ,
SF_Compute   
)

◆ IMPLEMENT_GLOBAL_SHADER() [13/13]

IMPLEMENT_GLOBAL_SHADER ( FSetupAdaptiveProbeIndirectArgsCS  ,
"/Engine/Private/Lumen/LumenScreenProbeGather.usf"  ,
"SetupAdaptiveProbeIndirectArgsCS"  ,
SF_Compute   
)

◆ InterpolateAndIntegrate()

void InterpolateAndIntegrate ( FRDGBuilder GraphBuilder,
const FSceneTextures SceneTextures,
FViewInfo View,
const FLumenSceneFrameTemporaries FrameTemporaries,
const FScreenProbeParameters ScreenProbeParameters,
const FScreenProbeGatherParameters GatherParameters,
FScreenProbeIntegrateParameters IntegrateParameters,
const FLumenScreenSpaceBentNormalParameters ScreenSpaceBentNormalParameters,
EReflectionsMethod  ReflectionsMethod,
FRDGTextureRef  DiffuseIndirect,
FRDGTextureRef  LightIsMoving,
FRDGTextureRef  BackfaceDiffuseIndirect,
FRDGTextureRef  RoughSpecularIndirect,
ERDGPassFlags  ComputePassFlags 
)

◆ SupportsHairScreenTraces()

bool SupportsHairScreenTraces ( )

◆ UpdateHistoryScreenProbeGather()

void UpdateHistoryScreenProbeGather ( FRDGBuilder GraphBuilder,
const FViewInfo View,
const FSceneTextures SceneTextures,
FLumenSceneFrameTemporaries FrameTemporaries,
const FScreenProbeGatherCommonParameters ScreenProbeGatherCommonParameters,
const FScreenProbeIntegrateParameters IntegrateParameters,
FLumenScreenSpaceBentNormalParameters ScreenSpaceBentNormalParameters,
bool  bPropagateGlobalLightingChange,
FRDGTextureRef DiffuseIndirect,
FRDGTextureRef  LightIsMoving,
FRDGTextureRef BackfaceDiffuseIndirect,
FRDGTextureRef RoughSpecularIndirect,
ERDGPassFlags  ComputePassFlags 
)

Variable Documentation

◆ CVarLumenRadianceCacheClipmapDistributionBase

FAutoConsoleVariableRef CVarLumenRadianceCacheClipmapDistributionBase(TEXT("r.Lumen.ScreenProbeGather.RadianceCache.ClipmapDistributionBase"), GLumenRadianceCacheClipmapDistributionBase, TEXT("Base of the Pow() that controls the size of each successive clipmap relative to the first."), ECVF_RenderThreadSafe) ( TEXT("r.Lumen.ScreenProbeGather.RadianceCache.ClipmapDistributionBase")  ,
GLumenRadianceCacheClipmapDistributionBase  ,
TEXT("Base of the Pow() that controls the size of each successive clipmap relative to the first." ,
ECVF_RenderThreadSafe   
)

◆ CVarLumenRadianceCacheClipmapWorldExtent

FAutoConsoleVariableRef CVarLumenRadianceCacheClipmapWorldExtent(TEXT("r.Lumen.ScreenProbeGather.RadianceCache.ClipmapWorldExtent"), GLumenRadianceCacheClipmapWorldExtent, TEXT("World space extent of the first clipmap"), ECVF_RenderThreadSafe) ( TEXT("r.Lumen.ScreenProbeGather.RadianceCache.ClipmapWorldExtent")  ,
GLumenRadianceCacheClipmapWorldExtent  ,
TEXT("World space extent of the first clipmap" ,
ECVF_RenderThreadSafe   
)

◆ CVarLumenScreenProbeClearHistoryEveryFrame

FAutoConsoleVariableRef CVarLumenScreenProbeClearHistoryEveryFrame(TEXT("r.Lumen.ScreenProbeGather.Temporal.ClearHistoryEveryFrame"), GLumenScreenProbeClearHistoryEveryFrame, TEXT("Whether to clear the history every frame for debugging"), ECVF_RenderThreadSafe) ( TEXT("r.Lumen.ScreenProbeGather.Temporal.ClearHistoryEveryFrame")  ,
GLumenScreenProbeClearHistoryEveryFrame  ,
TEXT("Whether to clear the history every frame for debugging" ,
ECVF_RenderThreadSafe   
)

◆ CVarLumenScreenProbeHistoryDistanceThreshold

TAutoConsoleVariable< float > CVarLumenScreenProbeHistoryDistanceThreshold(TEXT("r.Lumen.ScreenProbeGather.Temporal.DistanceThreshold"), 0.01f, TEXT("Relative distance threshold needed to discard last frame's lighting results. Lower values reduce ghosting from characters when near a wall but increase flickering artifacts."), ECVF_Scalability|ECVF_RenderThreadSafe) ( TEXT("r.Lumen.ScreenProbeGather.Temporal.DistanceThreshold")  ,
0.  01f,
TEXT("Relative distance threshold needed to discard last frame's lighting results. Lower values reduce ghosting from characters when near a wall but increase flickering artifacts." ,
ECVF_Scalability ECVF_RenderThreadSafe 
)

◆ CVarLumenScreenProbeHistoryDistanceThresholdForFoliage

TAutoConsoleVariable< float > CVarLumenScreenProbeHistoryDistanceThresholdForFoliage(TEXT("r.Lumen.ScreenProbeGather.Temporal.DistanceThresholdForFoliage"), 0.03f, TEXT("r.Lumen.ScreenProbeGather.Temporal.DistanceThreshold which only affects foliage pixels. Often foliage has lots of discontinuities and edges and it's beneficial to be more agressive with keeping history there."), ECVF_Scalability|ECVF_RenderThreadSafe) ( TEXT("r.Lumen.ScreenProbeGather.Temporal.DistanceThresholdForFoliage")  ,
0.  03f,
TEXT("r.Lumen.ScreenProbeGather.Temporal.DistanceThreshold which only affects foliage pixels. Often foliage has lots of discontinuities and edges and it's beneficial to be more agressive with keeping history there." ,
ECVF_Scalability ECVF_RenderThreadSafe 
)

◆ CVarLumenScreenProbeInterpolationDepthWeight

TAutoConsoleVariable< float > CVarLumenScreenProbeInterpolationDepthWeight(TEXT("r.Lumen.ScreenProbeGather.InterpolationDepthWeight"), 1.0f, TEXT("Higher values will make lighting sharper on small elements, but somewhat less stable and will spawn more adaptive probes."), ECVF_Scalability|ECVF_RenderThreadSafe) ( TEXT("r.Lumen.ScreenProbeGather.InterpolationDepthWeight")  ,
1.  0f,
TEXT("Higher values will make lighting sharper on small elements, but somewhat less stable and will spawn more adaptive probes." ,
ECVF_Scalability ECVF_RenderThreadSafe 
)

◆ CVarLumenScreenProbeInterpolationDepthWeightForFoliage

TAutoConsoleVariable< float > CVarLumenScreenProbeInterpolationDepthWeightForFoliage(TEXT("r.Lumen.ScreenProbeGather.InterpolationDepthWeightForFoliage"), 0.25f, TEXT("Usually can be relaxed on foliage in order to spawn less adaptive probes, as light leaking is less visible on foliage."), ECVF_Scalability|ECVF_RenderThreadSafe) ( TEXT("r.Lumen.ScreenProbeGather.InterpolationDepthWeightForFoliage")  ,
0.  25f,
TEXT("Usually can be relaxed on foliage in order to spawn less adaptive probes, as light leaking is less visible on foliage." ,
ECVF_Scalability ECVF_RenderThreadSafe 
)

◆ CVarLumenScreenProbeTemporalMaxRayDirections

TAutoConsoleVariable< int32 > CVarLumenScreenProbeTemporalMaxRayDirections(TEXT("r.Lumen.ScreenProbeGather.Temporal.MaxRayDirections"), 8, TEXT("Number of possible random directions per pixel. Should be tweaked based on MaxFramesAccumulated."), ECVF_Scalability|ECVF_RenderThreadSafe) ( TEXT("r.Lumen.ScreenProbeGather.Temporal.MaxRayDirections")  ,
,
TEXT("Number of possible random directions per pixel. Should be tweaked based on MaxFramesAccumulated." ,
ECVF_Scalability ECVF_RenderThreadSafe 
)

◆ CVarRadianceCacheNumClipmaps

FAutoConsoleVariableRef CVarRadianceCacheNumClipmaps(TEXT("r.Lumen.ScreenProbeGather.RadianceCache.NumClipmaps"), GRadianceCacheNumClipmaps, TEXT("Number of radiance cache clipmaps."), ECVF_RenderThreadSafe) ( TEXT("r.Lumen.ScreenProbeGather.RadianceCache.NumClipmaps")  ,
GRadianceCacheNumClipmaps  ,
TEXT("Number of radiance cache clipmaps." ,
ECVF_RenderThreadSafe   
)

◆ CVarRadianceCacheProbeReprojectionRadiusScale

FAutoConsoleVariableRef CVarRadianceCacheProbeReprojectionRadiusScale(TEXT("r.Lumen.ScreenProbeGather.RadianceCache.ReprojectionRadiusScale"), GRadianceCacheReprojectionRadiusScale, TEXT(""), ECVF_RenderThreadSafe) ( TEXT("r.Lumen.ScreenProbeGather.RadianceCache.ReprojectionRadiusScale")  ,
GRadianceCacheReprojectionRadiusScale  ,
TEXT("")  ,
ECVF_RenderThreadSafe   
)

◆ CVarRadianceCacheResolution

FAutoConsoleVariableRef CVarRadianceCacheResolution(TEXT("r.Lumen.ScreenProbeGather.RadianceCache.GridResolution"), GRadianceCacheGridResolution, TEXT("Resolution of the probe placement grid within each clipmap"), ECVF_RenderThreadSafe) ( TEXT("r.Lumen.ScreenProbeGather.RadianceCache.GridResolution")  ,
GRadianceCacheGridResolution  ,
TEXT("Resolution of the probe placement grid within each clipmap" ,
ECVF_RenderThreadSafe   
)

◆ CVarRadianceCacheStats

FAutoConsoleVariableRef CVarRadianceCacheStats(TEXT("r.Lumen.ScreenProbeGather.RadianceCache.Stats"), GRadianceCacheStats, TEXT("GPU print out Radiance Cache update stats."), ECVF_RenderThreadSafe) ( TEXT("r.Lumen.ScreenProbeGather.RadianceCache.Stats")  ,
GRadianceCacheStats  ,
TEXT("GPU print out Radiance Cache update stats." ,
ECVF_RenderThreadSafe   
)

◆ GLumenGatherCvars

FLumenGatherCvarState GLumenGatherCvars
extern

◆ GLumenMaxShortRangeAOMultibounceAlbedo

float GLumenMaxShortRangeAOMultibounceAlbedo
extern

◆ GLumenRadianceCache

int32 GLumenRadianceCache = 1

◆ GLumenRadianceCacheClipmapDistributionBase

float GLumenRadianceCacheClipmapDistributionBase = 2.0f

◆ GLumenRadianceCacheClipmapWorldExtent

float GLumenRadianceCacheClipmapWorldExtent = 2500.0f

◆ GLumenScreenProbeClearHistoryEveryFrame

int32 GLumenScreenProbeClearHistoryEveryFrame = 0

◆ GLumenScreenProbeDiffuseIntegralMethod

int32 GLumenScreenProbeDiffuseIntegralMethod = 0

◆ GLumenScreenProbeDownsampleFactor

int32 GLumenScreenProbeDownsampleFactor = 16

◆ GLumenScreenProbeExtraAmbientOcclusion

int32 GLumenScreenProbeExtraAmbientOcclusion = 0

◆ GLumenScreenProbeExtraAmbientOcclusionExponent

float GLumenScreenProbeExtraAmbientOcclusionExponent = .5f

◆ GLumenScreenProbeExtraAmbientOcclusionMaxDistanceWorldSpace

float GLumenScreenProbeExtraAmbientOcclusionMaxDistanceWorldSpace = 500.0f

◆ GLumenScreenProbeFixedJitterIndex

int32 GLumenScreenProbeFixedJitterIndex = -1

◆ GLumenScreenProbeFractionOfLightingMovingForFastUpdateMode

float GLumenScreenProbeFractionOfLightingMovingForFastUpdateMode = .1f

◆ GLumenScreenProbeFullResolutionJitterWidth

float GLumenScreenProbeFullResolutionJitterWidth = 1

◆ GLumenScreenProbeGather

int32 GLumenScreenProbeGather = 1

◆ GLumenScreenProbeGatherAdaptiveProbeAllocationFraction

float GLumenScreenProbeGatherAdaptiveProbeAllocationFraction = .5f

◆ GLumenScreenProbeGatherOctahedronResolutionScale

float GLumenScreenProbeGatherOctahedronResolutionScale = 1.0f

◆ GLumenScreenProbeGatherReferenceMode

int32 GLumenScreenProbeGatherReferenceMode = 0

◆ GLumenScreenProbeIntegrationTileClassification

int32 GLumenScreenProbeIntegrationTileClassification = 1

◆ GLumenScreenProbeIrradianceFormat

int32 GLumenScreenProbeIrradianceFormat = 1

◆ GLumenScreenProbeMaterialAO

int32 GLumenScreenProbeMaterialAO = 1

◆ GLumenScreenProbeRelativeSpeedDifferenceToConsiderLightingMoving

float GLumenScreenProbeRelativeSpeedDifferenceToConsiderLightingMoving = .005f

◆ GLumenScreenProbeScreenTracesThicknessScaleWhenNoFallback

float GLumenScreenProbeScreenTracesThicknessScaleWhenNoFallback = 2

◆ GLumenScreenProbeSpatialFilter

int32 GLumenScreenProbeSpatialFilter = 1

◆ GLumenScreenProbeStochasticInterpolation

int32 GLumenScreenProbeStochasticInterpolation = 1

◆ GLumenScreenProbeSupportTwoSidedFoliageBackfaceDiffuse

int32 GLumenScreenProbeSupportTwoSidedFoliageBackfaceDiffuse = 1

◆ GLumenScreenProbeTemporalFastUpdateModeUseNeighborhoodClamp

int32 GLumenScreenProbeTemporalFastUpdateModeUseNeighborhoodClamp = 0

◆ GLumenScreenProbeTemporalFilter

int32 GLumenScreenProbeTemporalFilter = 1

◆ GLumenScreenProbeTemporalFilterProbes

int32 GLumenScreenProbeTemporalFilterProbes = 0

◆ GLumenScreenProbeTemporalHistoryNormalThreshold

float GLumenScreenProbeTemporalHistoryNormalThreshold = 45.0f

◆ GLumenScreenProbeTemporalMaxFastUpdateModeAmount

float GLumenScreenProbeTemporalMaxFastUpdateModeAmount = .9f

◆ GLumenScreenProbeTemporalMaxFramesAccumulated

float GLumenScreenProbeTemporalMaxFramesAccumulated = 10.0f

◆ GLumenScreenProbeTileDebugMode

int32 GLumenScreenProbeTileDebugMode = 0

◆ GLumenScreenProbeTracingOctahedronResolution

int32 GLumenScreenProbeTracingOctahedronResolution = 8

◆ GLumenShortRangeAmbientOcclusion

int32 GLumenShortRangeAmbientOcclusion = 1

◆ GRadianceCacheGridResolution

int32 GRadianceCacheGridResolution = 48

◆ GRadianceCacheNumClipmaps

int32 GRadianceCacheNumClipmaps = 4

◆ GRadianceCacheNumMipmaps

int32 GRadianceCacheNumMipmaps = 1

◆ GRadianceCacheProbeResolution

int32 GRadianceCacheProbeResolution = 32

◆ GRadianceCacheReprojectionRadiusScale

float GRadianceCacheReprojectionRadiusScale = 1.5f

◆ GRadianceCacheStats

int32 GRadianceCacheStats = 0

◆ GScreenProbeIntegrateTileSize

const int32 GScreenProbeIntegrateTileSize = 8