ShowFlag.VisualizeVolumetricCloudEmptySpaceSkipping
ShowFlag.VisualizeVolumetricCloudEmptySpaceSkipping
#Overview
name: ShowFlag.VisualizeVolumetricCloudEmptySpaceSkipping
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 8
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of ShowFlag.VisualizeVolumetricCloudEmptySpaceSkipping is to visualize the density of volumetric clouds for empty space skipping in the rendering system. This setting is primarily used for debugging and optimizing the volumetric cloud rendering process.
This setting variable is mainly relied upon by the Unreal Engine’s rendering subsystem, specifically the volumetric cloud rendering module. It’s used in conjunction with other visualization and debugging tools for the engine’s graphics pipeline.
The value of this variable is set through the engine’s show flags system, which allows developers to toggle various debug visualization modes. It’s typically set to 0 (disabled) by default in shipping builds, as indicated by the SHOWFLAG_FIXED_IN_SHIPPING macro.
This variable interacts closely with other volumetric cloud-related variables, particularly VisualizeVolumetricCloudConservativeDensity. They are often used together in conditional statements to determine whether to render or visualize certain aspects of volumetric clouds.
Developers should be aware that this variable is primarily intended for debugging and optimization purposes. It should not be enabled in shipping builds, as it’s designed to visualize internal rendering data that end-users don’t need to see.
Best practices when using this variable include:
- Use it in conjunction with other debugging tools to optimize volumetric cloud rendering performance.
- Be aware that enabling this visualization may impact performance, so it should be used judiciously during development.
- Ensure it’s disabled in shipping builds to avoid unnecessary performance overhead.
Regarding the associated variable VisualizeVolumetricCloudEmptySpaceSkipping:
This variable serves the same purpose as ShowFlag.VisualizeVolumetricCloudEmptySpaceSkipping and is used interchangeably in the code. It’s part of the EngineShowFlags structure and is used in various parts of the rendering pipeline to determine whether to visualize the volumetric cloud empty space skipping.
It’s used in similar contexts as the ShowFlag version, particularly in the DeferredShadingRenderer, PostProcessing, and VolumetricCloudRendering modules. The variable is checked to determine whether to render volumetric clouds normally or to visualize the empty space skipping optimization.
Developers should treat this variable the same way as its ShowFlag counterpart, using it for debugging and optimization purposes during development, and ensuring it’s disabled in shipping builds.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Public/ShowFlagsValues.inl:418
Scope: file
Source code excerpt:
/** Visualize volumetric cloud density for empty space skipping. */
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 */
#Associated Variable and Callsites
This variable is associated with another variable named VisualizeVolumetricCloudEmptySpaceSkipping
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Plugins/Media/MediaIOFramework/Source/MediaIOCore/Private/MediaCaptureSceneViewExtension.h:52
Scope (from outer to inner):
file
class class FMediaCaptureSceneViewExtension : public FSceneViewExtensionBase
function virtual void SetupView
Source code excerpt:
!InView.Family->EngineShowFlags.VisualizeShadingModels &&
!InView.Family->EngineShowFlags.VisualizeVolumetricCloudConservativeDensity &&
!InView.Family->EngineShowFlags.VisualizeVolumetricCloudEmptySpaceSkipping &&
!InView.Family->EngineShowFlags.ShaderComplexity;
}
else
{
bPostProcessingEnabled = InView.Family->EngineShowFlags.PostProcessing && !InView.Family->EngineShowFlags.ShaderComplexity && IsMobileHDR();
}
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Public/ShowFlagsValues.inl:418
Scope: file
Source code excerpt:
/** Visualize volumetric cloud density for empty space skipping. */
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 */
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/DeferredShadingRenderer.cpp:2178
Scope (from outer to inner):
file
function void FDeferredShadingSceneRenderer::Render
Source code excerpt:
const bool bShouldRenderVolumetricCloudBase = ShouldRenderVolumetricCloud(Scene, ViewFamily.EngineShowFlags);
const bool bShouldRenderVolumetricCloud = bShouldRenderVolumetricCloudBase && (!ViewFamily.EngineShowFlags.VisualizeVolumetricCloudConservativeDensity && !ViewFamily.EngineShowFlags.VisualizeVolumetricCloudEmptySpaceSkipping);
const bool bShouldVisualizeVolumetricCloud = bShouldRenderVolumetricCloudBase && (!!ViewFamily.EngineShowFlags.VisualizeVolumetricCloudConservativeDensity || !!ViewFamily.EngineShowFlags.VisualizeVolumetricCloudEmptySpaceSkipping);
bool bAsyncComputeVolumetricCloud = IsVolumetricRenderTargetEnabled() && IsVolumetricRenderTargetAsyncCompute();
bool bVolumetricRenderTargetRequired = bShouldRenderVolumetricCloud && !bHasRayTracedOverlay;
FRDGTextureRef ViewFamilyTexture = TryCreateViewFamilyTexture(GraphBuilder, ViewFamily);
if (RendererOutput == ERendererOutput::DepthPrepassOnly)
{
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/PostProcess/PostProcessEyeAdaptation.cpp:346
Scope (from outer to inner):
file
function bool IsAutoExposureDebugMode
Source code excerpt:
EngineShowFlags.VisualizeDistanceFieldAO ||
EngineShowFlags.VisualizeVolumetricCloudConservativeDensity ||
EngineShowFlags.VisualizeVolumetricCloudEmptySpaceSkipping ||
EngineShowFlags.CollisionVisibility ||
EngineShowFlags.CollisionPawn ||
!EngineShowFlags.PostProcessing;
}
float CalculateFixedAutoExposure(const FViewInfo& View)
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/PostProcess/PostProcessing.cpp:185
Scope (from outer to inner):
file
function bool IsPostProcessingEnabled
Source code excerpt:
!View.Family->EngineShowFlags.VisualizeShadingModels &&
!View.Family->EngineShowFlags.VisualizeVolumetricCloudConservativeDensity &&
!View.Family->EngineShowFlags.VisualizeVolumetricCloudEmptySpaceSkipping &&
!View.Family->EngineShowFlags.ShaderComplexity;
}
else
{
return View.Family->EngineShowFlags.PostProcessing && !View.Family->EngineShowFlags.ShaderComplexity && IsMobileHDR();
}
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/VolumetricCloudRendering.cpp:278
Scope (from outer to inner):
file
function bool ShouldViewVisualizeVolumetricCloudConservativeDensity
Source code excerpt:
bool ShouldViewVisualizeVolumetricCloudConservativeDensity(const FViewInfo& ViewInfo, const FEngineShowFlags& EngineShowFlags)
{
return (!!EngineShowFlags.VisualizeVolumetricCloudConservativeDensity || !!EngineShowFlags.VisualizeVolumetricCloudEmptySpaceSkipping)
&& !ViewInfo.bIsReflectionCapture
&& !ViewInfo.bIsSceneCapture
&& GIsEditor;
}
bool VolumetricCloudWantsToSampleLocalLights(const FScene* Scene, const FEngineShowFlags& EngineShowFlags)
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/VolumetricCloudRendering.cpp:622
Scope (from outer to inner):
file
function uint32 GetVolumetricCloudDebugViewMode
Source code excerpt:
return 1;
}
if (ShowFlags.VisualizeVolumetricCloudEmptySpaceSkipping)
{
return 2;
}
return 0;
}