GPUSkinCacheVisualizationRecomputeTangentsColor

GPUSkinCacheVisualizationRecomputeTangentsColor

#Overview

name: GPUSkinCacheVisualizationRecomputeTangentsColor

The value of this variable can be defined or overridden in .ini config files. 1 .ini config file referencing this setting variable.

It is referenced in 3 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of GPUSkinCacheVisualizationRecomputeTangentsColor is to define a visualization color for skeletal meshes that are using recomputed tangents in the GPU Skin Cache system.

This setting variable is primarily used in the rendering system, specifically within the GPU Skin Cache subsystem of Unreal Engine 5. It is part of the Engine module and is used for debugging and visualization purposes.

The value of this variable is set in the engine configuration files, as indicated by the UPROPERTY(globalconfig) decorator in the Engine.h file. It is stored as a FLinearColor, which represents a color in linear space.

This variable interacts with other GPU Skin Cache visualization variables, such as GPUSkinCacheVisualizationIncludedColor and GPUSkinCacheVisualizationExcludedColor. These variables are used together to provide visual feedback on the state of skeletal meshes in the GPU Skin Cache system.

Developers should be aware that this variable is used for debugging and visualization purposes only. It does not affect the actual rendering or performance of the GPU Skin Cache system. The color defined by this variable will be used to highlight skeletal meshes that are recomputing tangents in the visualization mode.

Best practices when using this variable include:

  1. Choose a distinct color that stands out from other visualization colors to easily identify meshes with recomputed tangents.
  2. Use this visualization in conjunction with other GPU Skin Cache visualization modes to get a comprehensive view of the system’s state.
  3. Remember that changing this color only affects the debug visualization and not the actual rendering output.
  4. Consider the impact on performance when enabling visualization modes in production builds, as they may introduce some overhead.

When working with this variable, developers should also familiarize themselves with the overall GPU Skin Cache system and its visualization tools to make the most effective use of this debugging feature.

#Setting Variables

#References In INI files

Location: <Workspace>/Engine/Config/BaseEngine.ini:265, section: [/Script/Engine.Engine]

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Classes/Engine/Engine.h:1228

Scope (from outer to inner):

file
class        class UEngine : public UObject , public FExec

Source code excerpt:

	/** The visualization color when sk mesh using recompute tangents. */
	UPROPERTY(globalconfig)
	FLinearColor GPUSkinCacheVisualizationRecomputeTangentsColor;

	/** The memory visualization threshold in MB for a skin cache entry */
	UPROPERTY(globalconfig)
	float GPUSkinCacheVisualizationLowMemoryThresholdInMB;
	UPROPERTY(globalconfig)
	float GPUSkinCacheVisualizationHighMemoryThresholdInMB;

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/GPUSkinCache.cpp:2459

Scope (from outer to inner):

file
function     FColor FGPUSkinCache::GetVisualizationDebugColor

Source code excerpt:

			bool bRecomputeTangent = Entry && Entry->DispatchData[SectionIndex].IndexBuffer;
			return Entry ? 
				   (bRecomputeTangent ? GEngine->GPUSkinCacheVisualizationRecomputeTangentsColor.QuantizeRound() : GEngine->GPUSkinCacheVisualizationIncludedColor.QuantizeRound()) : 
				   GEngine->GPUSkinCacheVisualizationExcludedColor.QuantizeRound();
		}
		else if (ModeType == FGPUSkinCacheVisualizationData::FModeType::Memory)
		{
			uint64 MemoryInBytes = (Entry && Entry->PositionAllocation) ? Entry->PositionAllocation->GetNumBytes() : 0;
#if RHI_RAYTRACING

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/GPUSkinCache.cpp:2514

Scope (from outer to inner):

file
function     void FGPUSkinCache::DrawVisualizationInfoText

Source code excerpt:

			DrawText(TEXT("SK Skin Cache Excluded"), GEngine->GPUSkinCacheVisualizationExcludedColor.QuantizeRound());
			DrawText(TEXT("SK Skin Cache Included"), GEngine->GPUSkinCacheVisualizationIncludedColor.QuantizeRound());
			DrawText(TEXT("SK Recompute Tangent ON"), GEngine->GPUSkinCacheVisualizationRecomputeTangentsColor.QuantizeRound());
		}
		else if (ModeType == FGPUSkinCacheVisualizationData::FModeType::Memory)
		{
			float UsedMemoryInMB = UsedMemoryInBytes / MBSize;
			float AvailableMemoryInMB = GSkinCacheSceneMemoryLimitInMB - UsedMemoryInMB;