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

Classes

class  FPruneLightGridCS
 
class  FProcessPrevFramePerfDataCS
 
class  FUpdateThrottleParametersCS
 
class  FGeneratePageFlagsFromPixelsCS
 
class  FGeneratePageFlagsFromFroxelsCS
 
class  FMarkCoarsePagesCS
 
class  FGenerateHierarchicalPageFlagsCS
 
class  FUpdatePhysicalPageAddresses
 
class  FUpdatePhysicalPages
 
class  FVirtualShadowMapPerPageShader
 
class  FPerPageShaderDispatcher
 
struct  FPerPageShaderDispatcher::FBinConfig
 
struct  FPerPageShaderDispatcher::FBin
 
struct  FPerPageShaderDispatcher::FBuilder
 
struct  FPerPageShaderDispatcher::FBuilder::FIdBinIndex
 
class  FClearPageTableCS
 
class  FAllocateNewPageMappingsCS
 
class  FPackAvailablePagesCS
 
class  FAppendPhysicalPageListsCS
 
class  FPropagateMappedMipsCS
 
class  FSelectPagesToInitializeCS
 
class  FInitializePhysicalPagesIndirectCS
 
class  FSelectPagesToMergeCS
 
class  FMergeStaticPhysicalPagesIndirectCS
 
class  FUpdateAndClearDirtyFlagsCS
 
class  FInitPageRectBoundsCS
 
class  FVirtualSmFeedbackStatusCS
 
class  FVirtualShadowMapSetupContext
 
class  FDebugVisualizeVirtualSmCS
 
class  FVirtualSmLogStatsCS
 
class  FVirtualSmLogPageListStatsCS
 
class  FVirtualSmPrintClipmapStatsCS
 
class  FCullPerPageDrawCommandsCs
 
class  FAllocateCommandInstanceOutputSpaceCs
 
class  FOutputCommandInstanceListsCs
 
struct  FCullingResult
 
struct  FVSMRenderViewCount
 
class  FCompactViewsVSM_CS
 
class  FComputeExplicitChunkDrawsViewMask_CS
 
class  FSelectPagesForHZBAndUpdateDirtyFlagsCS
 
class  FVirtualSmBuildHZBPerPageCS
 
class  FVirtualSmBBuildHZBPerPageTopCS
 

Namespaces

namespace  Nanite
 

Macros

#define LOCTEXT_NAMESPACE   "VirtualShadowMap"
 
#define PARSE_FLAG(x)   ParseFlag(EVSMStatSection::x, TEXT(#x), Token) ||
 
#define PRINT_LABEL_LINE(x)   TEXT(" " #x "\n")
 
#define CONCAT_FLAG_LABEL(x)   if ((GVSMStatSectionsEnabled & EVSMStatSection::x ) > 0) { FlagString += TEXT( #x ); FlagString += TEXT(","); }
 

Functions

 IMPLEMENT_STATIC_UNIFORM_BUFFER_SLOT (VirtualShadowMapUbSlot)
 
 IMPLEMENT_STATIC_UNIFORM_BUFFER_STRUCT (FVirtualShadowMapUniformParameters, "VirtualShadowMap", VirtualShadowMapUbSlot)
 
 CSV_DEFINE_CATEGORY (VSM, false)
 
 UE_TRACE_CHANNEL_DEFINE (VSMChannel, "Virtual Shadow Maps")
 
 DECLARE_DWORD_COUNTER_STAT (TEXT("VSM Nanite Views (Primary)"), STAT_VSMNaniteViewsPrimary, STATGROUP_ShadowRendering)
 
 DECLARE_DWORD_COUNTER_STAT (TEXT("VSM Single Page Count"), STAT_VSMSinglePageCount, STATGROUP_ShadowRendering)
 
 DECLARE_DWORD_COUNTER_STAT (TEXT("VSM Full Count"), STAT_VSMFullCount, STATGROUP_ShadowRendering)
 
FAutoConsoleVariableRef CVarEnableNonNaniteVSM (TEXT("r.Shadow.Virtual.NonNaniteVSM"), GEnableNonNaniteVSM, TEXT("Read-only and to be set in a config file (requires restart)."), ECVF_RenderThreadSafe|ECVF_ReadOnly)
 
DynamicRenderScaling::FBudget GDynamicResolutionVSMNaniteBudget (TEXT("DynamicResolutionVSMNanite"), &GetDynamicVSMResolutionSettings)
 
bool IsVirtualShadowMapLocalReceiverMaskEnabled ()
 
bool Nanite::IsStatFilterActive (const FString &FilterName)
 
bool IsVSMTranslucentHighQualityEnabled ()
 
bool IsLumenFrontLayerHistoryValid (const FViewInfo &View)
 
bool LightGridUses16BitBuffers (EShaderPlatform Platform)
 
bool DoesVSMWantFroxels (EShaderPlatform ShaderPlatform)
 
FMatrix CalcTranslatedWorldToShadowUVMatrix (const FMatrix &TranslatedWorldToShadowView, const FMatrix &ViewToClip)
 
FMatrix CalcTranslatedWorldToShadowUVNormalMatrix (const FMatrix &TranslatedWorldToShadowView, const FMatrix &ViewToClip)
 
 IMPLEMENT_GLOBAL_SHADER (FPruneLightGridCS, "/Engine/Private/VirtualShadowMaps/VirtualShadowMapPageMarking.usf", "PruneLightGridCS", SF_Compute)
 
 IMPLEMENT_GLOBAL_SHADER (FProcessPrevFramePerfDataCS, "/Engine/Private/VirtualShadowMaps/VirtualShadowMapThrottle.usf", "ProcessPrevFramePerfDataCS", SF_Compute)
 
 IMPLEMENT_GLOBAL_SHADER (FUpdateThrottleParametersCS, "/Engine/Private/VirtualShadowMaps/VirtualShadowMapThrottle.usf", "UpdateThrottleParametersCS", SF_Compute)
 
 IMPLEMENT_GLOBAL_SHADER (FGeneratePageFlagsFromPixelsCS, "/Engine/Private/VirtualShadowMaps/VirtualShadowMapPageMarking.usf", "GeneratePageFlagsFromPixels", SF_Compute)
 
 IMPLEMENT_GLOBAL_SHADER (FGeneratePageFlagsFromFroxelsCS, "/Engine/Private/VirtualShadowMaps/VirtualShadowMapPageMarking.usf", "GeneratePageFlagsFromFroxelsCS", SF_Compute)
 
 IMPLEMENT_GLOBAL_SHADER (FMarkCoarsePagesCS, "/Engine/Private/VirtualShadowMaps/VirtualShadowMapPageMarking.usf", "MarkCoarsePages", SF_Compute)
 
 IMPLEMENT_GLOBAL_SHADER (FGenerateHierarchicalPageFlagsCS, "/Engine/Private/VirtualShadowMaps/VirtualShadowMapPageManagement.usf", "GenerateHierarchicalPageFlags", SF_Compute)
 
 IMPLEMENT_GLOBAL_SHADER (FUpdatePhysicalPageAddresses, "/Engine/Private/VirtualShadowMaps/VirtualShadowMapPhysicalPageManagement.usf", "UpdatePhysicalPageAddresses", SF_Compute)
 
 IMPLEMENT_GLOBAL_SHADER (FUpdatePhysicalPages, "/Engine/Private/VirtualShadowMaps/VirtualShadowMapPhysicalPageManagement.usf", "UpdatePhysicalPages", SF_Compute)
 
 IMPLEMENT_GLOBAL_SHADER (FClearPageTableCS, "/Engine/Private/VirtualShadowMaps/VirtualShadowMapPhysicalPageManagement.usf", "ClearPageTableCS", SF_Compute)
 
 IMPLEMENT_GLOBAL_SHADER (FAllocateNewPageMappingsCS, "/Engine/Private/VirtualShadowMaps/VirtualShadowMapPhysicalPageManagement.usf", "AllocateNewPageMappingsCS", SF_Compute)
 
 IMPLEMENT_GLOBAL_SHADER (FPackAvailablePagesCS, "/Engine/Private/VirtualShadowMaps/VirtualShadowMapPhysicalPageManagement.usf", "PackAvailablePages", SF_Compute)
 
 IMPLEMENT_GLOBAL_SHADER (FAppendPhysicalPageListsCS, "/Engine/Private/VirtualShadowMaps/VirtualShadowMapPhysicalPageManagement.usf", "AppendPhysicalPageLists", SF_Compute)
 
 IMPLEMENT_GLOBAL_SHADER (FPropagateMappedMipsCS, "/Engine/Private/VirtualShadowMaps/VirtualShadowMapPageManagement.usf", "PropagateMappedMips", SF_Compute)
 
 IMPLEMENT_GLOBAL_SHADER (FSelectPagesToInitializeCS, "/Engine/Private/VirtualShadowMaps/VirtualShadowMapPhysicalPageManagement.usf", "SelectPagesToInitializeCS", SF_Compute)
 
 IMPLEMENT_GLOBAL_SHADER (FInitializePhysicalPagesIndirectCS, "/Engine/Private/VirtualShadowMaps/VirtualShadowMapPhysicalPageManagement.usf", "InitializePhysicalPagesIndirectCS", SF_Compute)
 
 IMPLEMENT_GLOBAL_SHADER (FSelectPagesToMergeCS, "/Engine/Private/VirtualShadowMaps/VirtualShadowMapPhysicalPageManagement.usf", "SelectPagesToMergeCS", SF_Compute)
 
 IMPLEMENT_GLOBAL_SHADER (FMergeStaticPhysicalPagesIndirectCS, "/Engine/Private/VirtualShadowMaps/VirtualShadowMapPhysicalPageManagement.usf", "MergeStaticPhysicalPagesIndirectCS", SF_Compute)
 
 IMPLEMENT_GLOBAL_SHADER (FUpdateAndClearDirtyFlagsCS, "/Engine/Private/VirtualShadowMaps/VirtualShadowMapPhysicalPageManagement.usf", "UpdateAndClearDirtyFlagsCS", SF_Compute)
 
 IMPLEMENT_GLOBAL_SHADER (FInitPageRectBoundsCS, "/Engine/Private/VirtualShadowMaps/VirtualShadowMapPhysicalPageManagement.usf", "InitPageRectBounds", SF_Compute)
 
 IMPLEMENT_GLOBAL_SHADER (FVirtualSmFeedbackStatusCS, "/Engine/Private/VirtualShadowMaps/VirtualShadowMapPhysicalPageManagement.usf", "FeedbackStatusCS", SF_Compute)
 
 IMPLEMENT_GLOBAL_SHADER (FDebugVisualizeVirtualSmCS, "/Engine/Private/VirtualShadowMaps/VirtualShadowMapDebug.usf", "DebugVisualizeVirtualSmCS", SF_Compute)
 
 IMPLEMENT_GLOBAL_SHADER (FVirtualSmLogStatsCS, "/Engine/Private/VirtualShadowMaps/VirtualShadowMapPrintStats.usf", "LogVirtualSmStatsCS", SF_Compute)
 
 IMPLEMENT_GLOBAL_SHADER (FVirtualSmLogPageListStatsCS, "/Engine/Private/VirtualShadowMaps/VirtualShadowMapPhysicalPageManagement.usf", "LogPageListStatsCS", SF_Compute)
 
 IMPLEMENT_GLOBAL_SHADER (FVirtualSmPrintClipmapStatsCS, "/Engine/Private/VirtualShadowMaps/VirtualShadowMapPrintStats.usf", "PrintClipmapStats", SF_Compute)
 
 IMPLEMENT_GLOBAL_SHADER (FCullPerPageDrawCommandsCs, "/Engine/Private/VirtualShadowMaps/VirtualShadowMapBuildPerPageDrawCommands.usf", "CullPerPageDrawCommandsCs", SF_Compute)
 
 IMPLEMENT_GLOBAL_SHADER (FAllocateCommandInstanceOutputSpaceCs, "/Engine/Private/VirtualShadowMaps/VirtualShadowMapBuildPerPageDrawCommands.usf", "AllocateCommandInstanceOutputSpaceCs", SF_Compute)
 
 IMPLEMENT_GLOBAL_SHADER (FOutputCommandInstanceListsCs, "/Engine/Private/VirtualShadowMaps/VirtualShadowMapBuildPerPageDrawCommands.usf", "OutputCommandInstanceListsCs", SF_Compute)
 
FVSMRenderViewCount GetRenderViewCount (const FProjectedShadowInfo *ProjectedShadowInfo)
 
 IMPLEMENT_GLOBAL_SHADER (FCompactViewsVSM_CS, "/Engine/Private/VirtualShadowMaps/VirtualShadowMapCompactViews.usf", "CompactViewsVSM_CS", SF_Compute)
 
 IMPLEMENT_GLOBAL_SHADER (FComputeExplicitChunkDrawsViewMask_CS, "/Engine/Private/VirtualShadowMaps/VirtualShadowMapComputeExplicitChunkDrawsViewMask.usf", "ComputeExplicitChunkDrawsViewMask", SF_Compute)
 
 IMPLEMENT_GLOBAL_SHADER (FSelectPagesForHZBAndUpdateDirtyFlagsCS, "/Engine/Private/VirtualShadowMaps/VirtualShadowMapPhysicalPageManagement.usf", "SelectPagesForHZBAndUpdateDirtyFlagsCS", SF_Compute)
 
 IMPLEMENT_GLOBAL_SHADER (FVirtualSmBuildHZBPerPageCS, "/Engine/Private/VirtualShadowMaps/VirtualShadowMapPhysicalPageManagement.usf", "BuildHZBPerPageCS", SF_Compute)
 
 IMPLEMENT_GLOBAL_SHADER (FVirtualSmBBuildHZBPerPageTopCS, "/Engine/Private/VirtualShadowMaps/VirtualShadowMapPhysicalPageManagement.usf", "BuildHZBPerPageTopCS", SF_Compute)
 

Variables

int32 GVSMMaxPageAgeSinceLastRequest
 
TAutoConsoleVariable< floatCVarNaniteMaxPixelsPerEdge
 
TAutoConsoleVariable< floatCVarNaniteMinPixelsPerEdgeHW
 
float GMinScreenRadiusForShadowCaster
 
int32 GVSMShowLightDrawEvents = 0
 
FAutoConsoleVariableRef CVarVSMShowLightDrawEvents (TEXT("r.Shadow.Virtual.ShowLightDrawEvents"), GVSMShowLightDrawEvents, TEXT("Enable Virtual Shadow Maps per-light draw events - may affect performance especially when there are many small lights in the scene."), ECVF_RenderThreadSafe)
 
TAutoConsoleVariable< int32CVarMarkPagesUseFroxels (TEXT("r.Shadow.Virtual.MarkPagesUsingFroxels"), 0, TEXT(" Higher throughput as it is not bandwidth limited. Is approximate as it only marks the center of each froxel representing 8x8 pixels."), ECVF_RenderThreadSafe)
 
TAutoConsoleVariable< int32CVarDebugDrawFroxels (TEXT("r.Shadow.Virtual.DebugDrawFroxels"), 0, TEXT("Render the froxels using shaderprint (which needs to be enabled) r.ShaderPrint.MaxLine also needs to be set to a high value as this produces many lines."), ECVF_RenderThreadSafe)
 
TAutoConsoleVariable< floatCVarDebugDrawFroxelRange (TEXT("r.Shadow.Virtual.DebugDrawFroxelRange"), 20.0f, TEXT("Range in froxel tiles from the mouse cursor which to draw debug froxels in."), ECVF_RenderThreadSafe)
 
TAutoConsoleVariable< int32CVarEnableVirtualShadowMaps (TEXT("r.Shadow.Virtual.Enable"), 0, TEXT("Provides high - quality shadows for next - gen projects with simplified setup.High efficiency culling when used with Nanite."), FConsoleVariableDelegate::CreateLambda([](IConsoleVariable *InVariable) { FGlobalComponentRecreateRenderStateContext Context;}), ECVF_Scalability|ECVF_RenderThreadSafe)
 
TAutoConsoleVariable< int32CVarMaxPhysicalPages (TEXT("r.Shadow.Virtual.MaxPhysicalPages"), 2048, TEXT("For more page pool control, see the 'ResolutionLodBias*' cvars."), ECVF_Scalability|ECVF_RenderThreadSafe)
 
TAutoConsoleVariable< int32CVarBuildDynamicHZB (TEXT("r.Shadow.Virtual.DynamicHZB"), 0, TEXT("Constructing separate HZB doubles the memory cost of the HZB (1/4 of the page pool) and incurs some cost for building the second HZB."), ECVF_RenderThreadSafe)
 
TAutoConsoleVariable< boolCVarShowStatsVisible (TEXT("r.Shadow.Virtual.Stats.Visible"), false, TEXT("Render VSM Stats to screen"), ECVF_RenderThreadSafe)
 
TAutoConsoleVariable< floatCVarMaxDOFResolutionBias (TEXT("r.Shadow.Virtual.MaxDOFResolutionBias"), 1.0f, TEXT("Set to 0 to turn off this feature. A higher value more aggressively lowers resolution."), ECVF_RenderThreadSafe)
 
TAutoConsoleVariable< int32CVarMarkPixelPages (TEXT("r.Shadow.Virtual.MarkPixelPages"), 1, TEXT("Marks pages in virtual shadow maps based on depth buffer pixels. Ability to disable is primarily for profiling and debugging."), ECVF_RenderThreadSafe)
 
TAutoConsoleVariable< int32CVarMarkPixelPagesMipModeLocal (TEXT("r.Shadow.Virtual.MarkPixelPagesMipModeLocal"), 0, TEXT(" 2 - Performance Mode: Use 4 lower res mips (8k, 2k, 512, 128)\n"), ECVF_RenderThreadSafe|ECVF_Scalability)
 
TAutoConsoleVariable< int32CVarMarkCoarsePagesLocal (TEXT("r.Shadow.Virtual.MarkCoarsePagesLocal"), 2, TEXT(" 2 - (default) Performance Mode: Suppress dynamic invalidations due to geometry changes (e.g., moving objects or WPO or animation).\n"), ECVF_Scalability|ECVF_RenderThreadSafe)
 
TAutoConsoleVariable< int32CVarCoarsePagesIncludeNonNanite (TEXT("r.Shadow.Virtual.NonNanite.IncludeInCoarsePages"), 1, TEXT("Rendering non-Nanite geometry into large coarse pages can be expensive; disabling this can be a significant performance win."), ECVF_Scalability|ECVF_RenderThreadSafe)
 
TAutoConsoleVariable< floatCVarNonNaniteCulledInstanceAllocationFactor (TEXT("r.Shadow.Virtual.NonNanite.CulledInstanceAllocationFactor"), 1.0f, TEXT("Setting to 1.0 is fully conservative. Lowering this is likely to produce artifacts unless you're certain the buffer won't overflow."), ECVF_RenderThreadSafe)
 
TAutoConsoleVariable< int32CVarNonNaniteMaxCulledInstanceAllocationSize (TEXT("r.Shadow.Virtual.NonNanite.MaxCulledInstanceAllocationSize"), 128 *1024 *1024, TEXT("Maximum number of instances that may be output from the culling pass into all VSM mip/clip levels. At 12 byte per instance reference this represents a 1.5GB clamp."), ECVF_RenderThreadSafe)
 
int32 GEnableNonNaniteVSM = 1
 
TAutoConsoleVariable< int32CVarVirtualShadowOnePassProjectionMaxLights (TEXT("r.Shadow.Virtual.OnePassProjection.MaxLightsPerPixel"), 16, TEXT("Generally set to 8 (32bpp), 16 (64bpp) or 32 (128bpp). Lower values require less transient VRAM during the lighting pass."), ECVF_Scalability|ECVF_RenderThreadSafe)
 
TAutoConsoleVariable< int32CVarDoNonNaniteBatching (TEXT("r.Shadow.Virtual.NonNanite.Batch"), 1, TEXT("."), ECVF_RenderThreadSafe)
 
TAutoConsoleVariable< int32CVarNonNaniteUseRadiusThreshold (TEXT("r.Shadow.Virtual.NonNanite.UseRadiusThreshold"), 1, TEXT("If enabled (default) the r.Shadow.RadiusThreshold cvar is also used for uncached virtual shadow maps to cull small non-nanite instances."), ECVF_RenderThreadSafe)
 
TAutoConsoleVariable< int32CVarDebugSkipMergePhysical (TEXT("r.Shadow.Virtual.DebugSkipMergePhysical"), 0, TEXT("Skip the merging of the static VSM cache into the dynamic one. This will create obvious visual artifacts when disabled."), ECVF_RenderThreadSafe)
 
TAutoConsoleVariable< int32CVarDebugSkipDynamicPageInvalidation (TEXT("r.Shadow.Virtual.Cache.DebugSkipDynamicPageInvalidation"), 0, TEXT("Skip invalidation of cached pages when geometry moves for debugging purposes. This will create obvious visual artifacts when disabled."), ECVF_RenderThreadSafe)
 
TAutoConsoleVariable< int32CVarNumPageAreaDiagSlots (TEXT("r.Shadow.Virtual.NonNanite.NumPageAreaDiagSlots"), 0, TEXT("Number of slots in diagnostics to report non-nanite instances with the largest page area coverage, < 0 uses the max number allowed, 0 disables."), ECVF_RenderThreadSafe)
 
TAutoConsoleVariable< int32CVarLargeInstancePageAreaThreshold (TEXT("r.Shadow.Virtual.NonNanite.LargeInstancePageAreaThreshold"), -1, TEXT("Used as a threshold when storing page area coverage stats for diagnostics."), ECVF_RenderThreadSafe)
 
TAutoConsoleVariable< floatCVarSMRTExtrapolateMaxSlopeLocal (TEXT("r.Shadow.Virtual.SMRT.ExtrapolateMaxSlopeLocal"), 0.05f, TEXT("Setting to 0 will disable slope extrapolation slightly improving projection performance, at the cost of reduced penumbra quality."), ECVF_Scalability|ECVF_RenderThreadSafe)
 
TAutoConsoleVariable< floatCVarSMRTMaxSlopeBiasLocal (TEXT("r.Shadow.Virtual.SMRT.MaxSlopeBiasLocal"), 50.0f, TEXT("Maximum depth slope. Low values produce artifacts if shadow resolution is insufficient. High values can worsen light leaks near occluders and sparkly pixels in shadowed areas."), ECVF_Scalability|ECVF_RenderThreadSafe)
 
TAutoConsoleVariable< floatCVarSMRTExtrapolateMaxSlopeDirectional (TEXT("r.Shadow.Virtual.SMRT.ExtrapolateMaxSlopeDirectional"), 5.0f, TEXT("Setting to 0 will disable slope extrapolation slightly improving projection performance, at the cost of reduced penumbra quality."), ECVF_Scalability|ECVF_RenderThreadSafe)
 
TAutoConsoleVariable< floatCVarVSMDynamicResolutionMaxLodBias
 
TAutoConsoleVariable< floatCVarVSMDynamicResolutionMaxLodBiasDirectional
 
TAutoConsoleVariable< floatCVarVSMDynamicResolutionMaxLodBiasLocal
 

Macro Definition Documentation

◆ CONCAT_FLAG_LABEL

#define CONCAT_FLAG_LABEL (   x)    if ((GVSMStatSectionsEnabled & EVSMStatSection::x ) > 0) { FlagString += TEXT( #x ); FlagString += TEXT(","); }

◆ LOCTEXT_NAMESPACE

#define LOCTEXT_NAMESPACE   "VirtualShadowMap"

◆ PARSE_FLAG

#define PARSE_FLAG (   x)    ParseFlag(EVSMStatSection::x, TEXT(#x), Token) ||

◆ PRINT_LABEL_LINE

#define PRINT_LABEL_LINE (   x)    TEXT(" " #x "\n")

Function Documentation

◆ CalcTranslatedWorldToShadowUVMatrix()

FMatrix CalcTranslatedWorldToShadowUVMatrix ( const FMatrix TranslatedWorldToShadowView,
const FMatrix ViewToClip 
)

◆ CalcTranslatedWorldToShadowUVNormalMatrix()

FMatrix CalcTranslatedWorldToShadowUVNormalMatrix ( const FMatrix TranslatedWorldToShadowView,
const FMatrix ViewToClip 
)

◆ CSV_DEFINE_CATEGORY()

CSV_DEFINE_CATEGORY ( VSM  ,
false   
)

◆ CVarEnableNonNaniteVSM()

FAutoConsoleVariableRef CVarEnableNonNaniteVSM ( TEXT("r.Shadow.Virtual.NonNaniteVSM")  ,
GEnableNonNaniteVSM  ,
TEXT("Read-only and to be set in a config file (requires restart).")  ,
ECVF_RenderThreadSafe ECVF_ReadOnly 
)

◆ DECLARE_DWORD_COUNTER_STAT() [1/3]

DECLARE_DWORD_COUNTER_STAT ( TEXT("VSM Full Count" ,
STAT_VSMFullCount  ,
STATGROUP_ShadowRendering   
)

◆ DECLARE_DWORD_COUNTER_STAT() [2/3]

DECLARE_DWORD_COUNTER_STAT ( TEXT("VSM Nanite Views (Primary)")  ,
STAT_VSMNaniteViewsPrimary  ,
STATGROUP_ShadowRendering   
)

◆ DECLARE_DWORD_COUNTER_STAT() [3/3]

DECLARE_DWORD_COUNTER_STAT ( TEXT("VSM Single Page Count" ,
STAT_VSMSinglePageCount  ,
STATGROUP_ShadowRendering   
)

◆ DoesVSMWantFroxels()

bool DoesVSMWantFroxels ( EShaderPlatform  ShaderPlatform)

◆ GDynamicResolutionVSMNaniteBudget()

DynamicRenderScaling::FBudget GDynamicResolutionVSMNaniteBudget ( TEXT("DynamicResolutionVSMNanite")  ,
GetDynamicVSMResolutionSettings 
)

◆ GetRenderViewCount()

FVSMRenderViewCount GetRenderViewCount ( const FProjectedShadowInfo ProjectedShadowInfo)

◆ IMPLEMENT_GLOBAL_SHADER() [1/33]

IMPLEMENT_GLOBAL_SHADER ( FAllocateCommandInstanceOutputSpaceCs  ,
"/Engine/Private/VirtualShadowMaps/VirtualShadowMapBuildPerPageDrawCommands.usf"  ,
"AllocateCommandInstanceOutputSpaceCs"  ,
SF_Compute   
)

◆ IMPLEMENT_GLOBAL_SHADER() [2/33]

IMPLEMENT_GLOBAL_SHADER ( FAllocateNewPageMappingsCS  ,
"/Engine/Private/VirtualShadowMaps/VirtualShadowMapPhysicalPageManagement.usf"  ,
"AllocateNewPageMappingsCS"  ,
SF_Compute   
)

◆ IMPLEMENT_GLOBAL_SHADER() [3/33]

IMPLEMENT_GLOBAL_SHADER ( FAppendPhysicalPageListsCS  ,
"/Engine/Private/VirtualShadowMaps/VirtualShadowMapPhysicalPageManagement.usf"  ,
"AppendPhysicalPageLists"  ,
SF_Compute   
)

◆ IMPLEMENT_GLOBAL_SHADER() [4/33]

IMPLEMENT_GLOBAL_SHADER ( FClearPageTableCS  ,
"/Engine/Private/VirtualShadowMaps/VirtualShadowMapPhysicalPageManagement.usf"  ,
"ClearPageTableCS"  ,
SF_Compute   
)

◆ IMPLEMENT_GLOBAL_SHADER() [5/33]

IMPLEMENT_GLOBAL_SHADER ( FCompactViewsVSM_CS  ,
"/Engine/Private/VirtualShadowMaps/VirtualShadowMapCompactViews.usf"  ,
"CompactViewsVSM_CS"  ,
SF_Compute   
)

◆ IMPLEMENT_GLOBAL_SHADER() [6/33]

IMPLEMENT_GLOBAL_SHADER ( FComputeExplicitChunkDrawsViewMask_CS  ,
"/Engine/Private/VirtualShadowMaps/VirtualShadowMapComputeExplicitChunkDrawsViewMask.usf"  ,
"ComputeExplicitChunkDrawsViewMask"  ,
SF_Compute   
)

◆ IMPLEMENT_GLOBAL_SHADER() [7/33]

IMPLEMENT_GLOBAL_SHADER ( FCullPerPageDrawCommandsCs  ,
"/Engine/Private/VirtualShadowMaps/VirtualShadowMapBuildPerPageDrawCommands.usf"  ,
"CullPerPageDrawCommandsCs"  ,
SF_Compute   
)

◆ IMPLEMENT_GLOBAL_SHADER() [8/33]

IMPLEMENT_GLOBAL_SHADER ( FDebugVisualizeVirtualSmCS  ,
"/Engine/Private/VirtualShadowMaps/VirtualShadowMapDebug.usf"  ,
"DebugVisualizeVirtualSmCS"  ,
SF_Compute   
)

◆ IMPLEMENT_GLOBAL_SHADER() [9/33]

IMPLEMENT_GLOBAL_SHADER ( FGenerateHierarchicalPageFlagsCS  ,
"/Engine/Private/VirtualShadowMaps/VirtualShadowMapPageManagement.usf"  ,
"GenerateHierarchicalPageFlags"  ,
SF_Compute   
)

◆ IMPLEMENT_GLOBAL_SHADER() [10/33]

IMPLEMENT_GLOBAL_SHADER ( FGeneratePageFlagsFromFroxelsCS  ,
"/Engine/Private/VirtualShadowMaps/VirtualShadowMapPageMarking.usf"  ,
"GeneratePageFlagsFromFroxelsCS"  ,
SF_Compute   
)

◆ IMPLEMENT_GLOBAL_SHADER() [11/33]

IMPLEMENT_GLOBAL_SHADER ( FGeneratePageFlagsFromPixelsCS  ,
"/Engine/Private/VirtualShadowMaps/VirtualShadowMapPageMarking.usf"  ,
"GeneratePageFlagsFromPixels"  ,
SF_Compute   
)

◆ IMPLEMENT_GLOBAL_SHADER() [12/33]

IMPLEMENT_GLOBAL_SHADER ( FInitializePhysicalPagesIndirectCS  ,
"/Engine/Private/VirtualShadowMaps/VirtualShadowMapPhysicalPageManagement.usf"  ,
"InitializePhysicalPagesIndirectCS"  ,
SF_Compute   
)

◆ IMPLEMENT_GLOBAL_SHADER() [13/33]

IMPLEMENT_GLOBAL_SHADER ( FInitPageRectBoundsCS  ,
"/Engine/Private/VirtualShadowMaps/VirtualShadowMapPhysicalPageManagement.usf"  ,
"InitPageRectBounds"  ,
SF_Compute   
)

◆ IMPLEMENT_GLOBAL_SHADER() [14/33]

IMPLEMENT_GLOBAL_SHADER ( FMarkCoarsePagesCS  ,
"/Engine/Private/VirtualShadowMaps/VirtualShadowMapPageMarking.usf"  ,
"MarkCoarsePages"  ,
SF_Compute   
)

◆ IMPLEMENT_GLOBAL_SHADER() [15/33]

IMPLEMENT_GLOBAL_SHADER ( FMergeStaticPhysicalPagesIndirectCS  ,
"/Engine/Private/VirtualShadowMaps/VirtualShadowMapPhysicalPageManagement.usf"  ,
"MergeStaticPhysicalPagesIndirectCS"  ,
SF_Compute   
)

◆ IMPLEMENT_GLOBAL_SHADER() [16/33]

IMPLEMENT_GLOBAL_SHADER ( FOutputCommandInstanceListsCs  ,
"/Engine/Private/VirtualShadowMaps/VirtualShadowMapBuildPerPageDrawCommands.usf"  ,
"OutputCommandInstanceListsCs"  ,
SF_Compute   
)

◆ IMPLEMENT_GLOBAL_SHADER() [17/33]

IMPLEMENT_GLOBAL_SHADER ( FPackAvailablePagesCS  ,
"/Engine/Private/VirtualShadowMaps/VirtualShadowMapPhysicalPageManagement.usf"  ,
"PackAvailablePages"  ,
SF_Compute   
)

◆ IMPLEMENT_GLOBAL_SHADER() [18/33]

IMPLEMENT_GLOBAL_SHADER ( FProcessPrevFramePerfDataCS  ,
"/Engine/Private/VirtualShadowMaps/VirtualShadowMapThrottle.usf"  ,
"ProcessPrevFramePerfDataCS"  ,
SF_Compute   
)

◆ IMPLEMENT_GLOBAL_SHADER() [19/33]

IMPLEMENT_GLOBAL_SHADER ( FPropagateMappedMipsCS  ,
"/Engine/Private/VirtualShadowMaps/VirtualShadowMapPageManagement.usf"  ,
"PropagateMappedMips"  ,
SF_Compute   
)

◆ IMPLEMENT_GLOBAL_SHADER() [20/33]

IMPLEMENT_GLOBAL_SHADER ( FPruneLightGridCS  ,
"/Engine/Private/VirtualShadowMaps/VirtualShadowMapPageMarking.usf"  ,
"PruneLightGridCS"  ,
SF_Compute   
)

◆ IMPLEMENT_GLOBAL_SHADER() [21/33]

IMPLEMENT_GLOBAL_SHADER ( FSelectPagesForHZBAndUpdateDirtyFlagsCS  ,
"/Engine/Private/VirtualShadowMaps/VirtualShadowMapPhysicalPageManagement.usf"  ,
"SelectPagesForHZBAndUpdateDirtyFlagsCS"  ,
SF_Compute   
)

◆ IMPLEMENT_GLOBAL_SHADER() [22/33]

IMPLEMENT_GLOBAL_SHADER ( FSelectPagesToInitializeCS  ,
"/Engine/Private/VirtualShadowMaps/VirtualShadowMapPhysicalPageManagement.usf"  ,
"SelectPagesToInitializeCS"  ,
SF_Compute   
)

◆ IMPLEMENT_GLOBAL_SHADER() [23/33]

IMPLEMENT_GLOBAL_SHADER ( FSelectPagesToMergeCS  ,
"/Engine/Private/VirtualShadowMaps/VirtualShadowMapPhysicalPageManagement.usf"  ,
"SelectPagesToMergeCS"  ,
SF_Compute   
)

◆ IMPLEMENT_GLOBAL_SHADER() [24/33]

IMPLEMENT_GLOBAL_SHADER ( FUpdateAndClearDirtyFlagsCS  ,
"/Engine/Private/VirtualShadowMaps/VirtualShadowMapPhysicalPageManagement.usf"  ,
"UpdateAndClearDirtyFlagsCS"  ,
SF_Compute   
)

◆ IMPLEMENT_GLOBAL_SHADER() [25/33]

IMPLEMENT_GLOBAL_SHADER ( FUpdatePhysicalPageAddresses  ,
"/Engine/Private/VirtualShadowMaps/VirtualShadowMapPhysicalPageManagement.usf"  ,
"UpdatePhysicalPageAddresses"  ,
SF_Compute   
)

◆ IMPLEMENT_GLOBAL_SHADER() [26/33]

IMPLEMENT_GLOBAL_SHADER ( FUpdatePhysicalPages  ,
"/Engine/Private/VirtualShadowMaps/VirtualShadowMapPhysicalPageManagement.usf"  ,
"UpdatePhysicalPages"  ,
SF_Compute   
)

◆ IMPLEMENT_GLOBAL_SHADER() [27/33]

IMPLEMENT_GLOBAL_SHADER ( FUpdateThrottleParametersCS  ,
"/Engine/Private/VirtualShadowMaps/VirtualShadowMapThrottle.usf"  ,
"UpdateThrottleParametersCS"  ,
SF_Compute   
)

◆ IMPLEMENT_GLOBAL_SHADER() [28/33]

IMPLEMENT_GLOBAL_SHADER ( FVirtualSmBBuildHZBPerPageTopCS  ,
"/Engine/Private/VirtualShadowMaps/VirtualShadowMapPhysicalPageManagement.usf"  ,
"BuildHZBPerPageTopCS"  ,
SF_Compute   
)

◆ IMPLEMENT_GLOBAL_SHADER() [29/33]

IMPLEMENT_GLOBAL_SHADER ( FVirtualSmBuildHZBPerPageCS  ,
"/Engine/Private/VirtualShadowMaps/VirtualShadowMapPhysicalPageManagement.usf"  ,
"BuildHZBPerPageCS"  ,
SF_Compute   
)

◆ IMPLEMENT_GLOBAL_SHADER() [30/33]

IMPLEMENT_GLOBAL_SHADER ( FVirtualSmFeedbackStatusCS  ,
"/Engine/Private/VirtualShadowMaps/VirtualShadowMapPhysicalPageManagement.usf"  ,
"FeedbackStatusCS"  ,
SF_Compute   
)

◆ IMPLEMENT_GLOBAL_SHADER() [31/33]

IMPLEMENT_GLOBAL_SHADER ( FVirtualSmLogPageListStatsCS  ,
"/Engine/Private/VirtualShadowMaps/VirtualShadowMapPhysicalPageManagement.usf"  ,
"LogPageListStatsCS"  ,
SF_Compute   
)

◆ IMPLEMENT_GLOBAL_SHADER() [32/33]

IMPLEMENT_GLOBAL_SHADER ( FVirtualSmLogStatsCS  ,
"/Engine/Private/VirtualShadowMaps/VirtualShadowMapPrintStats.usf"  ,
"LogVirtualSmStatsCS"  ,
SF_Compute   
)

◆ IMPLEMENT_GLOBAL_SHADER() [33/33]

IMPLEMENT_GLOBAL_SHADER ( FVirtualSmPrintClipmapStatsCS  ,
"/Engine/Private/VirtualShadowMaps/VirtualShadowMapPrintStats.usf"  ,
"PrintClipmapStats"  ,
SF_Compute   
)

◆ IMPLEMENT_STATIC_UNIFORM_BUFFER_SLOT()

IMPLEMENT_STATIC_UNIFORM_BUFFER_SLOT ( VirtualShadowMapUbSlot  )

◆ IMPLEMENT_STATIC_UNIFORM_BUFFER_STRUCT()

IMPLEMENT_STATIC_UNIFORM_BUFFER_STRUCT ( FVirtualShadowMapUniformParameters  ,
"VirtualShadowMap"  ,
VirtualShadowMapUbSlot   
)

◆ IsLumenFrontLayerHistoryValid()

bool IsLumenFrontLayerHistoryValid ( const FViewInfo View)

◆ IsVirtualShadowMapLocalReceiverMaskEnabled()

bool IsVirtualShadowMapLocalReceiverMaskEnabled ( )

◆ IsVSMTranslucentHighQualityEnabled()

bool IsVSMTranslucentHighQualityEnabled ( )

◆ LightGridUses16BitBuffers()

bool LightGridUses16BitBuffers ( EShaderPlatform  Platform)
extern

◆ UE_TRACE_CHANNEL_DEFINE()

UE_TRACE_CHANNEL_DEFINE ( VSMChannel  ,
"Virtual Shadow Maps"   
)

Variable Documentation

◆ CVarBuildDynamicHZB

TAutoConsoleVariable< int32 > CVarBuildDynamicHZB(TEXT("r.Shadow.Virtual.DynamicHZB"), 0, TEXT("Constructing separate HZB doubles the memory cost of the HZB (1/4 of the page pool) and incurs some cost for building the second HZB."), ECVF_RenderThreadSafe) ( TEXT("r.Shadow.Virtual.DynamicHZB")  ,
,
TEXT("Constructing separate HZB doubles the memory cost of the HZB (1/4 of the page pool) and incurs some cost for building the second HZB." ,
ECVF_RenderThreadSafe   
)

◆ CVarCoarsePagesIncludeNonNanite

TAutoConsoleVariable< int32 > CVarCoarsePagesIncludeNonNanite(TEXT("r.Shadow.Virtual.NonNanite.IncludeInCoarsePages"), 1, TEXT("Rendering non-Nanite geometry into large coarse pages can be expensive; disabling this can be a significant performance win."), ECVF_Scalability|ECVF_RenderThreadSafe) ( TEXT("r.Shadow.Virtual.NonNanite.IncludeInCoarsePages")  ,
,
TEXT("Rendering non-Nanite geometry into large coarse pages can be expensive; disabling this can be a significant performance win." ,
ECVF_Scalability ECVF_RenderThreadSafe 
)

◆ CVarDebugDrawFroxelRange

TAutoConsoleVariable< float > CVarDebugDrawFroxelRange(TEXT("r.Shadow.Virtual.DebugDrawFroxelRange"), 20.0f, TEXT("Range in froxel tiles from the mouse cursor which to draw debug froxels in."), ECVF_RenderThreadSafe) ( TEXT("r.Shadow.Virtual.DebugDrawFroxelRange")  ,
20.  0f,
TEXT("Range in froxel tiles from the mouse cursor which to draw debug froxels in." ,
ECVF_RenderThreadSafe   
)

◆ CVarDebugDrawFroxels

TAutoConsoleVariable< int32 > CVarDebugDrawFroxels(TEXT("r.Shadow.Virtual.DebugDrawFroxels"), 0, TEXT("Render the froxels using shaderprint (which needs to be enabled) r.ShaderPrint.MaxLine also needs to be set to a high value as this produces many lines."), ECVF_RenderThreadSafe) ( TEXT("r.Shadow.Virtual.DebugDrawFroxels")  ,
,
TEXT("Render the froxels using shaderprint (which needs to be enabled) r.ShaderPrint.MaxLine also needs to be set to a high value as this produces many lines." ,
ECVF_RenderThreadSafe   
)

◆ CVarDebugSkipDynamicPageInvalidation

TAutoConsoleVariable< int32 > CVarDebugSkipDynamicPageInvalidation(TEXT("r.Shadow.Virtual.Cache.DebugSkipDynamicPageInvalidation"), 0, TEXT("Skip invalidation of cached pages when geometry moves for debugging purposes. This will create obvious visual artifacts when disabled."), ECVF_RenderThreadSafe) ( TEXT("r.Shadow.Virtual.Cache.DebugSkipDynamicPageInvalidation")  ,
,
TEXT("Skip invalidation of cached pages when geometry moves for debugging purposes. This will create obvious visual artifacts when disabled." ,
ECVF_RenderThreadSafe   
)

◆ CVarDebugSkipMergePhysical

TAutoConsoleVariable< int32 > CVarDebugSkipMergePhysical(TEXT("r.Shadow.Virtual.DebugSkipMergePhysical"), 0, TEXT("Skip the merging of the static VSM cache into the dynamic one. This will create obvious visual artifacts when disabled."), ECVF_RenderThreadSafe) ( TEXT("r.Shadow.Virtual.DebugSkipMergePhysical")  ,
,
TEXT("Skip the merging of the static VSM cache into the dynamic one. This will create obvious visual artifacts when disabled." ,
ECVF_RenderThreadSafe   
)

◆ CVarDoNonNaniteBatching

TAutoConsoleVariable< int32 > CVarDoNonNaniteBatching(TEXT("r.Shadow.Virtual.NonNanite.Batch"), 1, TEXT("."), ECVF_RenderThreadSafe) ( TEXT("r.Shadow.Virtual.NonNanite.Batch")  ,
,
TEXT(".")  ,
ECVF_RenderThreadSafe   
)

◆ CVarEnableVirtualShadowMaps

TAutoConsoleVariable< int32 > CVarEnableVirtualShadowMaps(TEXT("r.Shadow.Virtual.Enable"), 0, TEXT("Provides high - quality shadows for next - gen projects with simplified setup.High efficiency culling when used with Nanite."), FConsoleVariableDelegate::CreateLambda([](IConsoleVariable *InVariable) { FGlobalComponentRecreateRenderStateContext Context; }), ECVF_Scalability|ECVF_RenderThreadSafe) ( TEXT("r.Shadow.Virtual.Enable")  ,
,
TEXT("Provides high - quality shadows for next - gen projects with simplified setup.High efficiency culling when used with Nanite." ,
FConsoleVariableDelegate::CreateLambda([](IConsoleVariable *InVariable) { FGlobalComponentRecreateRenderStateContext Context;})  ,
ECVF_Scalability ECVF_RenderThreadSafe 
)

◆ CVarLargeInstancePageAreaThreshold

TAutoConsoleVariable< int32 > CVarLargeInstancePageAreaThreshold(TEXT("r.Shadow.Virtual.NonNanite.LargeInstancePageAreaThreshold"), -1, TEXT("Used as a threshold when storing page area coverage stats for diagnostics."), ECVF_RenderThreadSafe) ( TEXT("r.Shadow.Virtual.NonNanite.LargeInstancePageAreaThreshold")  ,
1,
TEXT("Used as a threshold when storing page area coverage stats for diagnostics." ,
ECVF_RenderThreadSafe   
)

◆ CVarMarkCoarsePagesLocal

TAutoConsoleVariable< int32 > CVarMarkCoarsePagesLocal(TEXT("r.Shadow.Virtual.MarkCoarsePagesLocal"), 2, TEXT(" 2 - (default) Performance Mode: Suppress dynamic invalidations due to geometry changes (e.g., moving objects or WPO or animation).\n"), ECVF_Scalability|ECVF_RenderThreadSafe) ( TEXT("r.Shadow.Virtual.MarkCoarsePagesLocal")  ,
,
TEXT(" 2 - (default) Performance Mode: Suppress dynamic invalidations due to geometry changes (e.g., moving objects or WPO or animation).\n" ,
ECVF_Scalability ECVF_RenderThreadSafe 
)

◆ CVarMarkPagesUseFroxels

TAutoConsoleVariable< int32 > CVarMarkPagesUseFroxels(TEXT("r.Shadow.Virtual.MarkPagesUsingFroxels"), 0, TEXT(" Higher throughput as it is not bandwidth limited. Is approximate as it only marks the center of each froxel representing 8x8 pixels."), ECVF_RenderThreadSafe) ( TEXT("r.Shadow.Virtual.MarkPagesUsingFroxels")  ,
,
TEXT(" Higher throughput as it is not bandwidth limited. Is approximate as it only marks the center of each froxel representing 8x8 pixels." ,
ECVF_RenderThreadSafe   
)

◆ CVarMarkPixelPages

TAutoConsoleVariable< int32 > CVarMarkPixelPages(TEXT("r.Shadow.Virtual.MarkPixelPages"), 1, TEXT("Marks pages in virtual shadow maps based on depth buffer pixels. Ability to disable is primarily for profiling and debugging."), ECVF_RenderThreadSafe) ( TEXT("r.Shadow.Virtual.MarkPixelPages")  ,
,
TEXT("Marks pages in virtual shadow maps based on depth buffer pixels. Ability to disable is primarily for profiling and debugging." ,
ECVF_RenderThreadSafe   
)

◆ CVarMarkPixelPagesMipModeLocal

TAutoConsoleVariable< int32 > CVarMarkPixelPagesMipModeLocal(TEXT("r.Shadow.Virtual.MarkPixelPagesMipModeLocal"), 0, TEXT(" 2 - Performance Mode: Use 4 lower res mips (8k, 2k, 512, 128)\n"), ECVF_RenderThreadSafe|ECVF_Scalability) ( TEXT("r.Shadow.Virtual.MarkPixelPagesMipModeLocal")  ,
,
TEXT(" 2 - Performance Mode: Use 4 lower res mips (8k, 2k, 512, 128)\n" ,
ECVF_RenderThreadSafe ECVF_Scalability 
)

◆ CVarMaxDOFResolutionBias

TAutoConsoleVariable< float > CVarMaxDOFResolutionBias(TEXT("r.Shadow.Virtual.MaxDOFResolutionBias"), 1.0f, TEXT("Set to 0 to turn off this feature. A higher value more aggressively lowers resolution."), ECVF_RenderThreadSafe) ( TEXT("r.Shadow.Virtual.MaxDOFResolutionBias")  ,
1.  0f,
TEXT("Set to 0 to turn off this feature. A higher value more aggressively lowers resolution." ,
ECVF_RenderThreadSafe   
)

◆ CVarMaxPhysicalPages

TAutoConsoleVariable< int32 > CVarMaxPhysicalPages(TEXT("r.Shadow.Virtual.MaxPhysicalPages"), 2048, TEXT("For more page pool control, see the 'ResolutionLodBias*' cvars."), ECVF_Scalability|ECVF_RenderThreadSafe) ( TEXT("r.Shadow.Virtual.MaxPhysicalPages")  ,
2048  ,
TEXT("For more page pool control, see the 'ResolutionLodBias*' cvars." ,
ECVF_Scalability ECVF_RenderThreadSafe 
)

◆ CVarNaniteMaxPixelsPerEdge

TAutoConsoleVariable<float> CVarNaniteMaxPixelsPerEdge
extern

◆ CVarNaniteMinPixelsPerEdgeHW

TAutoConsoleVariable<float> CVarNaniteMinPixelsPerEdgeHW
extern

◆ CVarNonNaniteCulledInstanceAllocationFactor

TAutoConsoleVariable< float > CVarNonNaniteCulledInstanceAllocationFactor(TEXT("r.Shadow.Virtual.NonNanite.CulledInstanceAllocationFactor"), 1.0f, TEXT("Setting to 1.0 is fully conservative. Lowering this is likely to produce artifacts unless you're certain the buffer won't overflow."), ECVF_RenderThreadSafe) ( TEXT("r.Shadow.Virtual.NonNanite.CulledInstanceAllocationFactor")  ,
1.  0f,
TEXT("Setting to 1.0 is fully conservative. Lowering this is likely to produce artifacts unless you're certain the buffer won't overflow." ,
ECVF_RenderThreadSafe   
)

◆ CVarNonNaniteMaxCulledInstanceAllocationSize

TAutoConsoleVariable< int32 > CVarNonNaniteMaxCulledInstanceAllocationSize(TEXT("r.Shadow.Virtual.NonNanite.MaxCulledInstanceAllocationSize"), 128 *1024 *1024, TEXT("Maximum number of instances that may be output from the culling pass into all VSM mip/clip levels. At 12 byte per instance reference this represents a 1.5GB clamp."), ECVF_RenderThreadSafe) ( TEXT("r.Shadow.Virtual.NonNanite.MaxCulledInstanceAllocationSize")  ,
128 *1024 *  1024,
TEXT("Maximum number of instances that may be output from the culling pass into all VSM mip/clip levels. At 12 byte per instance reference this represents a 1.5GB clamp." ,
ECVF_RenderThreadSafe   
)

◆ CVarNonNaniteUseRadiusThreshold

TAutoConsoleVariable< int32 > CVarNonNaniteUseRadiusThreshold(TEXT("r.Shadow.Virtual.NonNanite.UseRadiusThreshold"), 1, TEXT("If enabled (default) the r.Shadow.RadiusThreshold cvar is also used for uncached virtual shadow maps to cull small non-nanite instances."), ECVF_RenderThreadSafe) ( TEXT("r.Shadow.Virtual.NonNanite.UseRadiusThreshold")  ,
,
TEXT("If enabled (default) the r.Shadow.RadiusThreshold cvar is also used for uncached virtual shadow maps to cull small non-nanite instances." ,
ECVF_RenderThreadSafe   
)

◆ CVarNumPageAreaDiagSlots

TAutoConsoleVariable< int32 > CVarNumPageAreaDiagSlots(TEXT("r.Shadow.Virtual.NonNanite.NumPageAreaDiagSlots"), 0, TEXT("Number of slots in diagnostics to report non-nanite instances with the largest page area coverage, < 0 uses the max number allowed, 0 disables."), ECVF_RenderThreadSafe) ( TEXT("r.Shadow.Virtual.NonNanite.NumPageAreaDiagSlots")  ,
,
TEXT("Number of slots in diagnostics to report non-nanite instances with the largest page area coverage, < 0 uses the max number allowed, 0 disables." ,
ECVF_RenderThreadSafe   
)

◆ CVarShowStatsVisible

TAutoConsoleVariable< bool > CVarShowStatsVisible(TEXT("r.Shadow.Virtual.Stats.Visible"), false, TEXT("Render VSM Stats to screen"), ECVF_RenderThreadSafe) ( TEXT("r.Shadow.Virtual.Stats.Visible")  ,
false  ,
TEXT("Render VSM Stats to screen" ,
ECVF_RenderThreadSafe   
)

◆ CVarSMRTExtrapolateMaxSlopeDirectional

TAutoConsoleVariable< float > CVarSMRTExtrapolateMaxSlopeDirectional(TEXT("r.Shadow.Virtual.SMRT.ExtrapolateMaxSlopeDirectional"), 5.0f, TEXT("Setting to 0 will disable slope extrapolation slightly improving projection performance, at the cost of reduced penumbra quality."), ECVF_Scalability|ECVF_RenderThreadSafe) ( TEXT("r.Shadow.Virtual.SMRT.ExtrapolateMaxSlopeDirectional")  ,
5.  0f,
TEXT("Setting to 0 will disable slope extrapolation slightly improving projection performance, at the cost of reduced penumbra quality." ,
ECVF_Scalability ECVF_RenderThreadSafe 
)

◆ CVarSMRTExtrapolateMaxSlopeLocal

TAutoConsoleVariable< float > CVarSMRTExtrapolateMaxSlopeLocal(TEXT("r.Shadow.Virtual.SMRT.ExtrapolateMaxSlopeLocal"), 0.05f, TEXT("Setting to 0 will disable slope extrapolation slightly improving projection performance, at the cost of reduced penumbra quality."), ECVF_Scalability|ECVF_RenderThreadSafe) ( TEXT("r.Shadow.Virtual.SMRT.ExtrapolateMaxSlopeLocal")  ,
0.  05f,
TEXT("Setting to 0 will disable slope extrapolation slightly improving projection performance, at the cost of reduced penumbra quality." ,
ECVF_Scalability ECVF_RenderThreadSafe 
)

◆ CVarSMRTMaxSlopeBiasLocal

TAutoConsoleVariable< float > CVarSMRTMaxSlopeBiasLocal(TEXT("r.Shadow.Virtual.SMRT.MaxSlopeBiasLocal"), 50.0f, TEXT("Maximum depth slope. Low values produce artifacts if shadow resolution is insufficient. High values can worsen light leaks near occluders and sparkly pixels in shadowed areas."), ECVF_Scalability|ECVF_RenderThreadSafe) ( TEXT("r.Shadow.Virtual.SMRT.MaxSlopeBiasLocal")  ,
50.  0f,
TEXT("Maximum depth slope. Low values produce artifacts if shadow resolution is insufficient. High values can worsen light leaks near occluders and sparkly pixels in shadowed areas." ,
ECVF_Scalability ECVF_RenderThreadSafe 
)

◆ CVarVirtualShadowOnePassProjectionMaxLights

TAutoConsoleVariable< int32 > CVarVirtualShadowOnePassProjectionMaxLights(TEXT("r.Shadow.Virtual.OnePassProjection.MaxLightsPerPixel"), 16, TEXT("Generally set to 8 (32bpp), 16 (64bpp) or 32 (128bpp). Lower values require less transient VRAM during the lighting pass."), ECVF_Scalability|ECVF_RenderThreadSafe) ( TEXT("r.Shadow.Virtual.OnePassProjection.MaxLightsPerPixel")  ,
16  ,
TEXT("Generally set to 8 (32bpp), 16 (64bpp) or 32 (128bpp). Lower values require less transient VRAM during the lighting pass." ,
ECVF_Scalability ECVF_RenderThreadSafe 
)

◆ CVarVSMDynamicResolutionMaxLodBias

TAutoConsoleVariable<float> CVarVSMDynamicResolutionMaxLodBias
extern

◆ CVarVSMDynamicResolutionMaxLodBiasDirectional

TAutoConsoleVariable<float> CVarVSMDynamicResolutionMaxLodBiasDirectional
extern

◆ CVarVSMDynamicResolutionMaxLodBiasLocal

TAutoConsoleVariable<float> CVarVSMDynamicResolutionMaxLodBiasLocal
extern

◆ CVarVSMShowLightDrawEvents

FAutoConsoleVariableRef CVarVSMShowLightDrawEvents(TEXT("r.Shadow.Virtual.ShowLightDrawEvents"), GVSMShowLightDrawEvents, TEXT("Enable Virtual Shadow Maps per-light draw events - may affect performance especially when there are many small lights in the scene."), ECVF_RenderThreadSafe) ( TEXT("r.Shadow.Virtual.ShowLightDrawEvents")  ,
GVSMShowLightDrawEvents  ,
TEXT("Enable Virtual Shadow Maps per-light draw events - may affect performance especially when there are many small lights in the scene." ,
ECVF_RenderThreadSafe   
)

◆ GEnableNonNaniteVSM

int32 GEnableNonNaniteVSM = 1

◆ GMinScreenRadiusForShadowCaster

float GMinScreenRadiusForShadowCaster
extern

◆ GVSMMaxPageAgeSinceLastRequest

int32 GVSMMaxPageAgeSinceLastRequest
extern

◆ GVSMShowLightDrawEvents

int32 GVSMShowLightDrawEvents = 0