ShowFlag.VirtualShadowMapPersistentData
ShowFlag.VirtualShadowMapPersistentData
#Overview
name: ShowFlag.VirtualShadowMapPersistentData
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Allows to override a specific showflag (works in editor and game, \
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of ShowFlag.VirtualShadowMapPersistentData is to control the visibility of persistent data related to Virtual Shadow Maps in Unreal Engine 5’s rendering system. This setting is primarily used for debugging and development purposes within the engine’s shadow mapping system.
This setting variable is mainly utilized by the rendering subsystem of Unreal Engine 5, specifically in the deferred shading renderer module. It’s defined in the engine’s show flags, which are used to toggle various rendering features and debug visualizations.
The value of this variable is set in the ShowFlagsValues.inl file, where it’s defined using the SHOWFLAG_FIXED_IN_SHIPPING macro. The default value is set to 1, indicating that it’s enabled by default.
ShowFlag.VirtualShadowMapPersistentData interacts with the VirtualShadowMapArray and is used within the FDeferredShadingSceneRenderer::Render function. This suggests that it’s closely tied to the Virtual Shadow Map system in Unreal Engine 5.
Developers should be aware that this variable is marked as SFG_Developer, meaning it’s intended for development and debugging purposes. It’s not meant to be used in shipping builds of the game, as indicated by the SHOWFLAG_FIXED_IN_SHIPPING macro.
Best practices when using this variable include:
- Use it primarily during development and debugging of shadow-related issues.
- Be aware that enabling this flag may have performance implications, as it’s likely displaying additional debug information.
- Ensure it’s disabled in shipping builds to avoid any potential performance overhead.
Regarding the associated variable VirtualShadowMapPersistentData, it appears to be the same variable, just referenced in different contexts. The purpose and usage remain the same as described above. It’s defined in the same location and used in the same way within the engine’s rendering system. The considerations and best practices for using this variable are identical to those mentioned for ShowFlag.VirtualShadowMapPersistentData.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Public/ShowFlagsValues.inl:420
Scope: file
Source code excerpt:
SHOWFLAG_FIXED_IN_SHIPPING(0, VisualizeVolumetricCloudEmptySpaceSkipping, SFG_Visualize, NSLOCTEXT("UnrealEd", "VisualizeVolumetricCloudEmptySpaceSkippingSF", "Volumetric Cloud Empty Space Skipping Density"))
SHOWFLAG_FIXED_IN_SHIPPING(1, VirtualShadowMapPersistentData, SFG_Developer, NSLOCTEXT("UnrealEd", "VirtualShadowMapPersistentData", "Virtual Shadow Map Persistent Data"))
SHOWFLAG_FIXED_IN_SHIPPING(0, DebugDrawDistantVirtualSMLights, SFG_Advanced, NSLOCTEXT("UnrealEd", "DebugDrawDistantVirtualSMLightsSF", "Debug Draw Distant VSM Lights"))
/** Debug the Virtual Texture System */
SHOWFLAG_FIXED_IN_SHIPPING(0, VirtualTextureResidency, SFG_Hidden, NSLOCTEXT("UnrealEd", "VirtualTextureResidency", "Virtual Texture Residency"))
#Associated Variable and Callsites
This variable is associated with another variable named VirtualShadowMapPersistentData
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Public/ShowFlagsValues.inl:420
Scope: file
Source code excerpt:
SHOWFLAG_FIXED_IN_SHIPPING(0, VisualizeVolumetricCloudEmptySpaceSkipping, SFG_Visualize, NSLOCTEXT("UnrealEd", "VisualizeVolumetricCloudEmptySpaceSkippingSF", "Volumetric Cloud Empty Space Skipping Density"))
SHOWFLAG_FIXED_IN_SHIPPING(1, VirtualShadowMapPersistentData, SFG_Developer, NSLOCTEXT("UnrealEd", "VirtualShadowMapPersistentData", "Virtual Shadow Map Persistent Data"))
SHOWFLAG_FIXED_IN_SHIPPING(0, DebugDrawDistantVirtualSMLights, SFG_Advanced, NSLOCTEXT("UnrealEd", "DebugDrawDistantVirtualSMLightsSF", "Debug Draw Distant VSM Lights"))
/** Debug the Virtual Texture System */
SHOWFLAG_FIXED_IN_SHIPPING(0, VirtualTextureResidency, SFG_Hidden, NSLOCTEXT("UnrealEd", "VirtualTextureResidency", "Virtual Texture Residency"))
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/DeferredShadingRenderer.cpp:2658
Scope (from outer to inner):
file
function void FDeferredShadingSceneRenderer::Render
Source code excerpt:
VirtualShadowMapArray,
*this,
ViewFamily.EngineShowFlags.VirtualShadowMapPersistentData);
}
}
// If not all depth is written during the prepass, kick off async compute cloud after basepass
if (bShouldRenderVolumetricCloud && bAsyncComputeVolumetricCloud && DepthPass.EarlyZPassMode != DDM_AllOpaque && !bHasRayTracedOverlay)
{