|
| | 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) |
| |
|
| int32 | GVSMMaxPageAgeSinceLastRequest |
| |
| TAutoConsoleVariable< float > | CVarNaniteMaxPixelsPerEdge |
| |
| TAutoConsoleVariable< float > | CVarNaniteMinPixelsPerEdgeHW |
| |
| 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< 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) |
| |
| 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) |
| |
| 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) |
| |
| 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) |
| |
| TAutoConsoleVariable< int32 > | CVarMaxPhysicalPages (TEXT("r.Shadow.Virtual.MaxPhysicalPages"), 2048, TEXT("For more page pool control, see the 'ResolutionLodBias*' cvars."), ECVF_Scalability|ECVF_RenderThreadSafe) |
| |
| 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) |
| |
| TAutoConsoleVariable< bool > | CVarShowStatsVisible (TEXT("r.Shadow.Virtual.Stats.Visible"), false, TEXT("Render VSM Stats to screen"), ECVF_RenderThreadSafe) |
| |
| 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) |
| |
| 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) |
| |
| 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) |
| |
| 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) |
| |
| 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) |
| |
| 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) |
| |
| 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) |
| |
| int32 | GEnableNonNaniteVSM = 1 |
| |
| 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) |
| |
| TAutoConsoleVariable< int32 > | CVarDoNonNaniteBatching (TEXT("r.Shadow.Virtual.NonNanite.Batch"), 1, TEXT("."), ECVF_RenderThreadSafe) |
| |
| 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) |
| |
| 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) |
| |
| 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) |
| |
| 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) |
| |
| 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) |
| |
| 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) |
| |
| 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) |
| |
| 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) |
| |
| TAutoConsoleVariable< float > | CVarVSMDynamicResolutionMaxLodBias |
| |
| TAutoConsoleVariable< float > | CVarVSMDynamicResolutionMaxLodBiasDirectional |
| |
| TAutoConsoleVariable< float > | CVarVSMDynamicResolutionMaxLodBiasLocal |
| |