r.VolumetricCloud.SkyAO.Debug

r.VolumetricCloud.SkyAO.Debug

#Overview

name: r.VolumetricCloud.SkyAO.Debug

This variable is created as a Console Variable (cvar).

It is referenced in 3 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of r.VolumetricCloud.SkyAO.Debug is to enable debugging information for the cloud sky Ambient Occlusion (AO) map in Unreal Engine’s volumetric cloud rendering system.

Regarding the associated variable CVarVolumetricCloudSkyAODebug:

This is the actual console variable object that controls the r.VolumetricCloud.SkyAO.Debug setting. It’s an int32 variable, suggesting that it might support multiple debug levels or options in the future, although it’s currently used as a boolean (0 for off, non-zero for on).

The CVarVolumetricCloudSkyAODebug variable is used directly in the rendering code to check if debugging should be enabled. For example, in the RenderVolumetricCloud function, it’s queried using GetValueOnRenderThread() to determine if cloud sky AO debugging should be performed for the current frame.

When working with this variable, developers should:

  1. Access its value using GetValueOnRenderThread() when in render thread code.
  2. Be aware that changes to this variable will affect rendering in real-time, allowing for on-the-fly debugging.
  3. Consider adding additional debug levels or options if more detailed debugging information is required in the future.

#References in C++ code

#Callsites

This variable is referenced in the following C++ source code:

#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/VolumetricCloudRendering.cpp:106

Scope: file

Source code excerpt:


static TAutoConsoleVariable<int32> CVarVolumetricCloudSkyAODebug(
	TEXT("r.VolumetricCloud.SkyAO.Debug"), 0,
	TEXT("Print information to debug the cloud sky AO map."),
	ECVF_RenderThreadSafe | ECVF_Scalability);

static TAutoConsoleVariable<float> CVarVolumetricCloudSkyAOSnapLength(
	TEXT("r.VolumetricCloud.SkyAO.SnapLength"), 20.0f,
	TEXT("Snapping size in kilometers of the cloud sky AO texture position to avoid flickering."),

#Associated Variable and Callsites

This variable is associated with another variable named CVarVolumetricCloudSkyAODebug. They share the same value. See the following C++ source code.

#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/VolumetricCloudRendering.cpp:105

Scope: file

Source code excerpt:

	ECVF_RenderThreadSafe | ECVF_Scalability);

static TAutoConsoleVariable<int32> CVarVolumetricCloudSkyAODebug(
	TEXT("r.VolumetricCloud.SkyAO.Debug"), 0,
	TEXT("Print information to debug the cloud sky AO map."),
	ECVF_RenderThreadSafe | ECVF_Scalability);

static TAutoConsoleVariable<float> CVarVolumetricCloudSkyAOSnapLength(
	TEXT("r.VolumetricCloud.SkyAO.SnapLength"), 20.0f,

#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/VolumetricCloudRendering.cpp:2525

Scope (from outer to inner):

file
function     bool FSceneRenderer::RenderVolumetricCloud

Source code excerpt:


			const bool DebugCloudShadowMap = CVarVolumetricCloudShadowMapDebug.GetValueOnRenderThread() && ShouldRenderCloudShadowmap(AtmosphericLight0);
			const bool DebugCloudSkyAO = CVarVolumetricCloudSkyAODebug.GetValueOnRenderThread() && ShouldRenderCloudSkyAO(SkyLight);

			struct FLocalCloudView
			{
				FViewInfo* ViewInfo;
				bool bShouldViewRenderVolumetricCloudRenderTarget;
				bool bEnableAerialPerspectiveSampling;