GPUSkinCacheVisualizationMidMemoryColor

GPUSkinCacheVisualizationMidMemoryColor

#Overview

name: GPUSkinCacheVisualizationMidMemoryColor

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 GPUSkinCacheVisualizationMidMemoryColor is to define a color used for visualizing the GPU skin cache memory usage in the mid-range. This variable is part of the GPU skin cache visualization system, which helps developers understand and debug memory usage in the GPU-based skin cache for character animation.

This setting variable is primarily used in the Engine module of Unreal Engine, specifically within the GPU skin cache subsystem. It’s referenced in the UEngine class and utilized in the GPUSkinCache.cpp file.

The value of this variable is set through the engine configuration system, as indicated by the UPROPERTY(globalconfig) decorator in the UEngine class definition.

GPUSkinCacheVisualizationMidMemoryColor interacts with other related variables:

These variables work together to create a color-coded visualization of GPU skin cache memory usage.

Developers should be aware that this variable is part of a debugging and visualization system. It’s not meant for runtime gameplay mechanics but rather for development and optimization purposes. The color defined by this variable will be used to represent memory usage between the low and high memory thresholds.

Best practices when using this variable include:

  1. Ensuring the color is visually distinct from the low and high memory colors for clear visualization.
  2. Using this visualization in conjunction with performance profiling tools to optimize GPU skin cache usage.
  3. Adjusting the associated memory thresholds (low and high) to suit the specific needs of the project and target hardware.
  4. Remember that this is a development tool and should typically be disabled or removed in shipping builds.

#Setting Variables

#References In INI files

Location: <Workspace>/Engine/Config/BaseEngine.ini:269, 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:1240

Scope (from outer to inner):

file
class        class UEngine : public UObject , public FExec

Source code excerpt:

	FLinearColor GPUSkinCacheVisualizationLowMemoryColor;
	UPROPERTY(globalconfig)
	FLinearColor GPUSkinCacheVisualizationMidMemoryColor;
	UPROPERTY(globalconfig)
	FLinearColor GPUSkinCacheVisualizationHighMemoryColor;

	/** The visualization colors of ray tracing LOD index offset from raster LOD */
	UPROPERTY(globalconfig)
	TArray<FLinearColor> GPUSkinCacheVisualizationRayTracingLODOffsetColors;

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

Scope (from outer to inner):

file
function     FColor FGPUSkinCache::GetVisualizationDebugColor

Source code excerpt:


			return MemoryInMB < GEngine->GPUSkinCacheVisualizationLowMemoryThresholdInMB ? GEngine->GPUSkinCacheVisualizationLowMemoryColor.QuantizeRound() :
				  (MemoryInMB < GEngine->GPUSkinCacheVisualizationHighMemoryThresholdInMB ? GEngine->GPUSkinCacheVisualizationMidMemoryColor.QuantizeRound() : GEngine->GPUSkinCacheVisualizationHighMemoryColor.QuantizeRound());
		}
		else if (ModeType == FGPUSkinCacheVisualizationData::FModeType::RayTracingLODOffset)
		{
	#if RHI_RAYTRACING
			int32 LODOffset = (Entry && RayTracingEntry) ? (RayTracingEntry->LOD - Entry->LOD) : 0;
			check (LODOffset >= 0);

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

Scope (from outer to inner):

file
function     void FGPUSkinCache::DrawVisualizationInfoText

Source code excerpt:

			DrawText(FString::Printf(TEXT("Total Available: %.2fMB"), AvailableMemoryInMB), FColor::White);
			DrawText(FString::Printf(TEXT("Low: < %.2fMB"), GEngine->GPUSkinCacheVisualizationLowMemoryThresholdInMB), GEngine->GPUSkinCacheVisualizationLowMemoryColor.QuantizeRound());
			DrawText(FString::Printf(TEXT("Mid: %.2f - %.2fMB"), GEngine->GPUSkinCacheVisualizationLowMemoryThresholdInMB, GEngine->GPUSkinCacheVisualizationHighMemoryThresholdInMB), GEngine->GPUSkinCacheVisualizationMidMemoryColor.QuantizeRound());
			DrawText(FString::Printf(TEXT("High: > %.2fMB"), GEngine->GPUSkinCacheVisualizationHighMemoryThresholdInMB), GEngine->GPUSkinCacheVisualizationHighMemoryColor.QuantizeRound());
		}
		else if (ModeType == FGPUSkinCacheVisualizationData::FModeType::RayTracingLODOffset)
		{
	#if RHI_RAYTRACING
			DrawText(TEXT("Skin Cache Visualization - RayTracingLODOffset"), FColor::White);