![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include "VirtualShadowMapCacheManager.h"#include "VirtualShadowMapClipmap.h"#include "VirtualShadowMapShaders.h"#include "RendererModule.h"#include "RenderGraphUtils.h"#include "RHIGPUReadback.h"#include "ScenePrivate.h"#include "HAL/FileManager.h"#include "NaniteDefinitions.h"#include "DataDrivenShaderPlatformInfo.h"#include "PrimitiveSceneInfo.h"#include "ShaderPrint.h"#include "RendererOnScreenNotification.h"#include "SystemTextures.h"#include "Shadows/ShadowScene.h"#include "ProfilingDebugging/CountersTrace.h"Classes | |
| class | FVirtualSmCopyStatsCS |
| class | FInvalidateInstancePagesLoadBalancerCS |
| class | FProcessInvalidationQueueGPUCS |
| class | FVSMResetInstanceStateCS |
| class | FVSMUpdateViewInstanceStateCS |
| class | FVirtualShadowMapInvalidationSceneRenderer |
Namespaces | |
| namespace | Nanite |
Macros | |
| #define | LOCTEXT_NAMESPACE "VirtualShadowMapCacheManager" |
Typedefs | |
| using | FLoadBalancer = TInstanceCullingLoadBalancer< SceneRenderingAllocator > |
| #define LOCTEXT_NAMESPACE "VirtualShadowMapCacheManager" |
| CSV_DECLARE_CATEGORY_EXTERN | ( | VSM | ) |
| IMPLEMENT_GLOBAL_SHADER | ( | FInvalidateInstancePagesLoadBalancerCS | , |
| "/Engine/Private/VirtualShadowMaps/VirtualShadowMapCacheLoadBalancer.usf" | , | ||
| "InvalidateInstancePagesLoadBalancerCS" | , | ||
| SF_Compute | |||
| ) |
| IMPLEMENT_GLOBAL_SHADER | ( | FProcessInvalidationQueueGPUCS | , |
| "/Engine/Private/VirtualShadowMaps/VirtualShadowMapCacheGPUInvalidation.usf" | , | ||
| "ProcessInvalidationQueueGPUCS" | , | ||
| SF_Compute | |||
| ) |
| IMPLEMENT_GLOBAL_SHADER | ( | FVirtualSmCopyStatsCS | , |
| "/Engine/Private/VirtualShadowMaps/VirtualShadowMapCopyStats.usf" | , | ||
| "CopyStatsCS" | , | ||
| SF_Compute | |||
| ) |
| IMPLEMENT_GLOBAL_SHADER | ( | FVSMResetInstanceStateCS | , |
| "/Engine/Private/VirtualShadowMaps/VirtualShadowMapCacheGPUInvalidation.usf" | , | ||
| "VSMResetInstanceStateCS" | , | ||
| SF_Compute | |||
| ) |
| IMPLEMENT_GLOBAL_SHADER | ( | FVSMUpdateViewInstanceStateCS | , |
| "/Engine/Private/VirtualShadowMaps/VirtualShadowMapCacheGPUInvalidation.usf" | , | ||
| "VSMUpdateViewInstanceStateCS" | , | ||
| SF_Compute | |||
| ) |
| IMPLEMENT_SCENE_EXTENSION | ( | FVirtualShadowMapArrayCacheManager | ) |
| IMPLEMENT_SCENE_UB_STRUCT | ( | FVirtualShadowMapInvalidationSceneUniforms | , |
| VSMCache | , | ||
| GetSceneUBDefaultParameters | |||
| ) |
| UE_TRACE_CHANNEL_EXTERN | ( | VSMChannel | ) |
| FAutoConsoleVariableRef CVarCacheDebugSkipRevealedPrimitivesInvalidate(TEXT("r.Shadow.Virtual.Cache.DebugSkipRevealedPrimitivesInvalidation"), GVSMCacheDebugSkipRevealedPrimitivesInvalidate, TEXT("Debug skip invalidation of revealed Non-Nanite primitives, i.e. they go from being culled on the CPU to unculled."), ECVF_RenderThreadSafe) | ( | TEXT("r.Shadow.Virtual.Cache.DebugSkipRevealedPrimitivesInvalidation") | , |
| GVSMCacheDebugSkipRevealedPrimitivesInvalidate | , | ||
| TEXT("Debug skip invalidation of revealed Non-Nanite primitives, i.e. they go from being culled on the CPU to unculled.") | , | ||
| ECVF_RenderThreadSafe | |||
| ) |
| FAutoConsoleVariableRef CVarCacheDeformableMeshesInvalidate(TEXT("r.Shadow.Virtual.Cache.DeformableMeshesInvalidate"), GVSMCacheDeformableMeshesInvalidate, TEXT("If enabled, Primitive Proxies that are marked as having deformable meshes (HasDeformableMesh() == true) cause invalidations regardless of whether their transforms are updated."), ECVF_RenderThreadSafe) | ( | TEXT("r.Shadow.Virtual.Cache.DeformableMeshesInvalidate") | , |
| GVSMCacheDeformableMeshesInvalidate | , | ||
| TEXT("If enabled, Primitive Proxies that are marked as having deformable meshes (HasDeformableMesh() == true) cause invalidations regardless of whether their transforms are updated.") | , | ||
| ECVF_RenderThreadSafe | |||
| ) |
| FAutoConsoleVariableRef CVarVSMAllowScreenOverflowMessages(TEXT("r.Shadow.Virtual.AllowScreenOverflowMessages"), GVSMAllowScreenOverflowMessages, TEXT("Can be used to disable on-screen VSM-related overflow messages. Even with the messages disabled, overflows will still be logged and can result in visual corruption."), ECVF_RenderThreadSafe) | ( | TEXT("r.Shadow.Virtual.AllowScreenOverflowMessages") | , |
| GVSMAllowScreenOverflowMessages | , | ||
| TEXT("Can be used to disable on-screen VSM-related overflow messages. Even with the messages disabled, overflows will still be logged and can result in visual corruption.") | , | ||
| ECVF_RenderThreadSafe | |||
| ) |
| TAutoConsoleVariable< float > CVarVSMDynamicResolutionMaxLodBias(TEXT("r.Shadow.Virtual.DynamicRes.MaxResolutionLodBias"), 2.0f, TEXT("This is the maximum LOD bias to clamp to for global dynamic shadow resolution reduction. 0 = disabled"), ECVF_RenderThreadSafe) | ( | TEXT("r.Shadow.Virtual.DynamicRes.MaxResolutionLodBias") | , |
| 2. | 0f, | ||
| TEXT("This is the maximum LOD bias to clamp to for global dynamic shadow resolution reduction. 0 = disabled") | , | ||
| ECVF_RenderThreadSafe | |||
| ) |
| TAutoConsoleVariable< float > CVarVSMDynamicResolutionMaxLodBiasDirectional(TEXT("r.Shadow.Virtual.DynamicRes.MaxComputeResolutionLodBiasDirectional"), 99999.0f, TEXT("This variable applies to directional lights only."), ECVF_RenderThreadSafe) | ( | TEXT("r.Shadow.Virtual.DynamicRes.MaxComputeResolutionLodBiasDirectional") | , |
| 99999. | 0f, | ||
| TEXT("This variable applies to directional lights only.") | , | ||
| ECVF_RenderThreadSafe | |||
| ) |
| TAutoConsoleVariable< float > CVarVSMDynamicResolutionMaxLodBiasLocal(TEXT("r.Shadow.Virtual.DynamicRes.MaxComputeResolutionLodBiasLocal"), 99999.0f, TEXT("This variable applies to local lights only."), ECVF_RenderThreadSafe) | ( | TEXT("r.Shadow.Virtual.DynamicRes.MaxComputeResolutionLodBiasLocal") | , |
| 99999. | 0f, | ||
| TEXT("This variable applies to local lights only.") | , | ||
| ECVF_RenderThreadSafe | |||
| ) |
| FAutoConsoleVariableRef CVarVSMLightRadiusCulling(TEXT("r.Shadow.Virtual.Cache.CPUCullInvalidationsOutsideLightRadius"), GVSMLightRadiusInvalidationCulling, TEXT("CPU culls invalidations that are outside a local light's radius."), ECVF_RenderThreadSafe) | ( | TEXT("r.Shadow.Virtual.Cache.CPUCullInvalidationsOutsideLightRadius") | , |
| GVSMLightRadiusInvalidationCulling | , | ||
| TEXT("CPU culls invalidations that are outside a local light's radius.") | , | ||
| ECVF_RenderThreadSafe | |||
| ) |
| FAutoConsoleVariableRef CVarVSMMaxPageAgeSinceLastRequest(TEXT("r.Shadow.Virtual.Cache.MaxPageAgeSinceLastRequest"), GVSMMaxPageAgeSinceLastRequest, TEXT("The maximum number of frames to allow cached pages that aren't requested in the current frame to live. 0=disabled."), ECVF_RenderThreadSafe) | ( | TEXT("r.Shadow.Virtual.Cache.MaxPageAgeSinceLastRequest") | , |
| GVSMMaxPageAgeSinceLastRequest | , | ||
| TEXT("The maximum number of frames to allow cached pages that aren't requested in the current frame to live. 0=disabled.") | , | ||
| ECVF_RenderThreadSafe | |||
| ) |
| int32 GVSMAllowScreenOverflowMessages = 1 |
| int32 GVSMLightRadiusInvalidationCulling = 1 |
| int32 GVSMMaxPageAgeSinceLastRequest = 1000 |