landscape.OutputLayersRTContent
landscape.OutputLayersRTContent
#Overview
name: landscape.OutputLayersRTContent
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
This will output the content of render target. This is used for debugging only.
It is referenced in 6
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of landscape.OutputLayersRTContent is to enable debugging output for the content of render targets in the Landscape system of Unreal Engine 5. This setting variable is primarily used for debugging purposes within the Landscape module.
Based on the callsites provided, this setting variable is used exclusively within the Landscape module of Unreal Engine 5. It is specifically utilized in the LandscapeEditLayers.cpp file, which suggests it’s related to the landscape editing and layering system.
The value of this variable is set through a console variable (CVar) system. It’s initialized with a default value of 0, which means the debugging output is disabled by default.
This variable interacts closely with another console variable named CVarOutputLayersWeightmapsRTContent. In several functions, both variables are checked to determine if debug output should be displayed.
Developers must be aware that this is a debugging tool and should not be enabled in production builds. It’s designed to output the content of render targets, which can be resource-intensive and may impact performance.
Best practices when using this variable include:
- Only enable it when actively debugging landscape render target issues.
- Disable it when not needed to avoid unnecessary performance overhead.
- Use it in conjunction with CVarOutputLayersWeightmapsRTContent for a more comprehensive debug output when dealing with weightmaps.
Regarding the associated variable CVarOutputLayersRTContent:
The purpose of CVarOutputLayersRTContent is the same as landscape.OutputLayersRTContent. It’s the actual console variable that controls the behavior described above.
This variable is used in the same Landscape module and specifically in the landscape editing and layering system.
Its value is set through the console variable system, initialized to 0 (disabled) by default.
It interacts directly with the landscape.OutputLayersRTContent setting and is often used in conjunction with CVarOutputLayersWeightmapsRTContent for debugging purposes.
Developers should be aware that this variable directly controls the debug output behavior and should be used cautiously, as it can affect performance when enabled.
Best practices for CVarOutputLayersRTContent are the same as those for landscape.OutputLayersRTContent, as they essentially control the same functionality.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Landscape/Private/LandscapeEditLayers.cpp:106
Scope: file
Source code excerpt:
static TAutoConsoleVariable<int32> CVarOutputLayersRTContent(
TEXT("landscape.OutputLayersRTContent"),
0,
TEXT("This will output the content of render target. This is used for debugging only."));
static TAutoConsoleVariable<int32> CVarOutputLayersWeightmapsRTContent(
TEXT("landscape.OutputLayersWeightmapsRTContent"),
0,
#Associated Variable and Callsites
This variable is associated with another variable named CVarOutputLayersRTContent
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Landscape/Private/LandscapeEditLayers.cpp:105
Scope: file
Source code excerpt:
TEXT("Trigger N render captures during the next weightmap draw calls."));
static TAutoConsoleVariable<int32> CVarOutputLayersRTContent(
TEXT("landscape.OutputLayersRTContent"),
0,
TEXT("This will output the content of render target. This is used for debugging only."));
static TAutoConsoleVariable<int32> CVarOutputLayersWeightmapsRTContent(
TEXT("landscape.OutputLayersWeightmapsRTContent"),
#Loc: <Workspace>/Engine/Source/Runtime/Landscape/Private/LandscapeEditLayers.cpp:3213
Scope (from outer to inner):
file
function void ALandscape::PrintLayersDebugHeightData
Source code excerpt:
void ALandscape::PrintLayersDebugHeightData(const FString& InContext, const TArray<FColor>& InHeightmapData, const FIntPoint& InDataSize, uint8 InMipRender, bool InOutputNormals) const
{
bool DisplayDebugPrint = CVarOutputLayersRTContent.GetValueOnAnyThread() == 1 ? true : false;
bool DisplayHeightAsDelta = false;
if (!DisplayDebugPrint)
{
return;
}
#Loc: <Workspace>/Engine/Source/Runtime/Landscape/Private/LandscapeEditLayers.cpp:3315
Scope (from outer to inner):
file
function void ALandscape::PrintLayersDebugWeightData
Source code excerpt:
void ALandscape::PrintLayersDebugWeightData(const FString& InContext, const TArray<FColor>& InWeightmapData, const FIntPoint& InDataSize, uint8 InMipRender) const
{
bool DisplayDebugPrint = (CVarOutputLayersRTContent.GetValueOnAnyThread() == 1 || CVarOutputLayersWeightmapsRTContent.GetValueOnAnyThread() == 1) ? true : false;
if (!DisplayDebugPrint)
{
return;
}
#Loc: <Workspace>/Engine/Source/Runtime/Landscape/Private/LandscapeEditLayers.cpp:3353
Scope (from outer to inner):
file
function void ALandscape::PrintLayersDebugRT
Source code excerpt:
void ALandscape::PrintLayersDebugRT(const FString& InContext, UTextureRenderTarget2D* InDebugRT, uint8 InMipRender, bool InOutputHeight, bool InOutputNormals) const
{
bool DisplayDebugPrint = (CVarOutputLayersRTContent.GetValueOnAnyThread() == 1 || CVarOutputLayersWeightmapsRTContent.GetValueOnAnyThread() == 1) ? true : false;
if (!DisplayDebugPrint)
{
return;
}
#Loc: <Workspace>/Engine/Source/Runtime/Landscape/Private/LandscapeEditLayers.cpp:3397
Scope (from outer to inner):
file
function void ALandscape::PrintLayersDebugTextureResource
Source code excerpt:
void ALandscape::PrintLayersDebugTextureResource(const FString& InContext, FTextureResource* InTextureResource, uint8 InMipRender, bool InOutputHeight, bool InOutputNormals) const
{
bool DisplayDebugPrint = (CVarOutputLayersRTContent.GetValueOnAnyThread() == 1 || CVarOutputLayersWeightmapsRTContent.GetValueOnAnyThread() == 1) ? true : false;
if (!DisplayDebugPrint)
{
return;
}