ShowFlag.VisualizeSkyAtmosphere
ShowFlag.VisualizeSkyAtmosphere
#Overview
name: ShowFlag.VisualizeSkyAtmosphere
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.VisualizeSkyAtmosphere is to enable the visualization of the Sky Atmosphere on screen for debugging and development purposes in Unreal Engine 5.
-
This setting variable is primarily used by the rendering system, specifically for the Sky Atmosphere visualization.
-
The Unreal Engine subsystem that relies on this setting variable is the Renderer module, as evidenced by the references in the PostProcessing.cpp and SkyAtmosphereRendering.cpp files.
-
The value of this variable is set through the engine show flags system, which allows developers to toggle various visualization and debug options.
-
This variable interacts closely with the SkyAtmosphere component and other related rendering systems. It is often used in conjunction with other show flags and rendering conditions.
-
Developers must be aware that this variable is only available in non-shipping builds, as indicated by the SHOWFLAG_FIXED_IN_SHIPPING macro used in its definition.
-
Best practices for using this variable include:
- Using it only for debugging and development purposes.
- Ensuring that a SkyAtmosphere component is present in the scene when enabling this flag.
- Being aware that enabling this visualization may impact performance, so it should be used judiciously.
Regarding the associated variable VisualizeSkyAtmosphere:
-
This appears to be the same variable, just referenced in different contexts. It’s used in the same way as ShowFlag.VisualizeSkyAtmosphere.
-
It’s utilized in the post-processing pipeline to determine whether to add the Sky Atmosphere debug passes.
-
The variable is checked in various rendering functions to decide if Sky Atmosphere-related debug visualizations should be rendered.
-
It’s important to note that this visualization is only available in editor builds (#if WITH_EDITOR), which reinforces its use as a development and debugging tool rather than a runtime feature.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Public/ShowFlagsValues.inl:399
Scope: file
Source code excerpt:
/** Enable the SkyAtmosphere visualization to be drawn on screen */
SHOWFLAG_FIXED_IN_SHIPPING(0, VisualizeSkyAtmosphere, SFG_Visualize, NSLOCTEXT("UnrealEd", "VisualizeSkyAtmosphereSF", "Sky Atmosphere"))
/** Enable the light function atlas debug visualization to be drawn on screen */
SHOWFLAG_FIXED_IN_SHIPPING(0, VisualizeLightFunctionAtlas, SFG_Visualize, NSLOCTEXT("UnrealEd", "VisualizeLightFunctionAtlasSF", "Visualize Light Function Atlas"))
/** Shows a full-screen calibration color post process material defined in renderer config */
SHOWFLAG_ALWAYS_ACCESSIBLE(VisualizeCalibrationColor, SFG_Developer, NSLOCTEXT("UnrealEd", "VisualizeCalibrationColorSF", "Visualize Calibration Color"))
/** Shows a full-screen calibration grayscale post process material defined in renderer config */
SHOWFLAG_ALWAYS_ACCESSIBLE(VisualizeCalibrationGrayscale, SFG_Developer, NSLOCTEXT("UnrealEd", "VisualizeCalibrationGrayscaleSF", "Visualize Calibration Grayscale"))
#Associated Variable and Callsites
This variable is associated with another variable named VisualizeSkyAtmosphere
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Public/ShowFlagsValues.inl:399
Scope: file
Source code excerpt:
/** Enable the SkyAtmosphere visualization to be drawn on screen */
SHOWFLAG_FIXED_IN_SHIPPING(0, VisualizeSkyAtmosphere, SFG_Visualize, NSLOCTEXT("UnrealEd", "VisualizeSkyAtmosphereSF", "Sky Atmosphere"))
/** Enable the light function atlas debug visualization to be drawn on screen */
SHOWFLAG_FIXED_IN_SHIPPING(0, VisualizeLightFunctionAtlas, SFG_Visualize, NSLOCTEXT("UnrealEd", "VisualizeLightFunctionAtlasSF", "Visualize Light Function Atlas"))
/** Shows a full-screen calibration color post process material defined in renderer config */
SHOWFLAG_ALWAYS_ACCESSIBLE(VisualizeCalibrationColor, SFG_Developer, NSLOCTEXT("UnrealEd", "VisualizeCalibrationColorSF", "Visualize Calibration Color"))
/** Shows a full-screen calibration grayscale post process material defined in renderer config */
SHOWFLAG_ALWAYS_ACCESSIBLE(VisualizeCalibrationGrayscale, SFG_Developer, NSLOCTEXT("UnrealEd", "VisualizeCalibrationGrayscaleSF", "Visualize Calibration Grayscale"))
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/PostProcess/PostProcessing.cpp:373
Scope (from outer to inner):
file
function void AddPostProcessingPasses
Source code excerpt:
VisualizeSubstrate,
VisualizeLightGrid,
VisualizeSkyAtmosphere,
VisualizeSkyLightIlluminanceMeter,
VisualizeLightFunctionAtlas,
VisualizeLevelInstance,
SelectionOutline,
EditorPrimitive,
VisualizeShadingModels,
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/PostProcess/PostProcessing.cpp:469
Scope (from outer to inner):
file
function void AddPostProcessingPasses
Source code excerpt:
#if WITH_EDITOR
PassSequence.SetEnabled(EPass::VisualizeSkyAtmosphere, Scene&& View.Family && View.Family->EngineShowFlags.VisualizeSkyAtmosphere && ShouldRenderSkyAtmosphereDebugPasses(Scene, View.Family->EngineShowFlags));
PassSequence.SetEnabled(EPass::VisualizeSkyLightIlluminanceMeter, Scene&& Scene->SkyLight && View.Family && View.Family->EngineShowFlags.VisualizeSkyLightIlluminance);
PassSequence.SetEnabled(EPass::VisualizeLightFunctionAtlas, Scene && Scene->LightFunctionAtlasSceneData.GetLightFunctionAtlasEnabled() && View.Family && View.Family->EngineShowFlags.VisualizeLightFunctionAtlas);
PassSequence.SetEnabled(EPass::VisualizeLevelInstance, GIsEditor && EngineShowFlags.EditingLevelInstance && EngineShowFlags.VisualizeLevelInstanceEditing && !bVisualizeHDR);
PassSequence.SetEnabled(EPass::SelectionOutline, GIsEditor && EngineShowFlags.Selection && EngineShowFlags.SelectionOutline && !EngineShowFlags.Wireframe && !bVisualizeHDR);
PassSequence.SetEnabled(EPass::EditorPrimitive, FSceneRenderer::ShouldCompositeEditorPrimitives(View));
#else
PassSequence.SetEnabled(EPass::VisualizeSkyAtmosphere, false);
PassSequence.SetEnabled(EPass::VisualizeSkyLightIlluminanceMeter, false);
PassSequence.SetEnabled(EPass::VisualizeLightFunctionAtlas, false);
PassSequence.SetEnabled(EPass::VisualizeLevelInstance, false);
PassSequence.SetEnabled(EPass::SelectionOutline, false);
PassSequence.SetEnabled(EPass::EditorPrimitive, false);
#endif
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/PostProcess/PostProcessing.cpp:1451
Scope (from outer to inner):
file
function void AddPostProcessingPasses
Source code excerpt:
#if WITH_EDITOR
if (PassSequence.IsEnabled(EPass::VisualizeSkyAtmosphere))
{
FScreenPassRenderTarget OverrideOutput;
PassSequence.AcceptOverrideIfLastPass(EPass::VisualizeSkyAtmosphere, OverrideOutput);
SceneColor = AddSkyAtmosphereDebugPasses(GraphBuilder, Scene, *View.Family, View, SceneColor);
}
if (PassSequence.IsEnabled(EPass::VisualizeSkyLightIlluminanceMeter))
{
FScreenPassRenderTarget OverrideOutput;
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/SceneRendering.cpp:3714
Scope (from outer to inner):
file
function void FSceneRenderer::OnRenderFinish
Source code excerpt:
const bool bShowDFDisabledWarning = !bMeshDistanceFieldEnabled && (ViewFamily.EngineShowFlags.VisualizeMeshDistanceFields || ViewFamily.EngineShowFlags.VisualizeGlobalDistanceField || ViewFamily.EngineShowFlags.VisualizeDistanceFieldAO);
const bool bShowNoSkyAtmosphereComponentWarning = !Scene->HasSkyAtmosphere() && ViewFamily.EngineShowFlags.VisualizeSkyAtmosphere;
const bool bStationarySkylight = Scene->SkyLight && Scene->SkyLight->bWantsStaticShadowing;
const bool bShowSkylightWarning = bStationarySkylight && !FReadOnlyCVARCache::EnableStationarySkylight();
const bool bRealTimeSkyCaptureButNothingToCapture = Scene->SkyLight && Scene->SkyLight->bRealTimeCaptureEnabled && (!Scene->HasSkyAtmosphere() && !Scene->HasVolumetricCloud() && (Views.Num() > 0 && !Views[0].bSceneHasSkyMaterial));
const bool bShowPointLightWarning = UsedWholeScenePointLightNames.Num() > 0 && !FReadOnlyCVARCache::EnablePointLightShadows();
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/SkyAtmosphereRendering.cpp:2083
Scope (from outer to inner):
file
function bool ShouldRenderSkyAtmosphereDebugPasses
Source code excerpt:
bool ShouldRenderSkyAtmosphereDebugPasses(const FScene* Scene, const FEngineShowFlags& EngineShowFlags)
{
return EngineShowFlags.VisualizeSkyAtmosphere && ShouldRenderSkyAtmosphere(Scene, EngineShowFlags);
}
FScreenPassTexture AddSkyAtmosphereDebugPasses(FRDGBuilder& GraphBuilder, FScene* Scene, const FSceneViewFamily& ViewFamily, const FViewInfo& View, FScreenPassTexture& ScreenPassSceneColor)
{
#if WITH_EDITOR
check(ShouldRenderSkyAtmosphere(Scene, ViewFamily.EngineShowFlags)); // This should not be called if we should not render SkyAtmosphere
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/SkyAtmosphereRendering.cpp:2094
Scope (from outer to inner):
file
function FScreenPassTexture AddSkyAtmosphereDebugPasses
Source code excerpt:
RDG_GPU_STAT_SCOPE(GraphBuilder, SkyAtmosphereDebugVisualize);
const bool bSkyAtmosphereVisualizeShowFlag = ViewFamily.EngineShowFlags.VisualizeSkyAtmosphere;
FSkyAtmosphereRenderSceneInfo& SkyInfo = *Scene->GetSkyAtmosphereSceneInfo();
const FSkyAtmosphereSceneProxy& SkyAtmosphereSceneProxy = SkyInfo.GetSkyAtmosphereSceneProxy();
const FAtmosphereSetup& Atmosphere = SkyAtmosphereSceneProxy.GetAtmosphereSetup();
if (bSkyAtmosphereVisualizeShowFlag)