GPUSkinCacheVisualizationHighMemoryColor

GPUSkinCacheVisualizationHighMemoryColor

#Overview

name: GPUSkinCacheVisualizationHighMemoryColor

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 GPUSkinCacheVisualizationHighMemoryColor is to provide a color for visualizing high memory usage in the GPU Skin Cache system. This variable is part of Unreal Engine’s rendering and performance visualization tools, specifically for the GPU-based skin cache feature.

The GPU Skin Cache system is primarily used in Unreal Engine’s rendering subsystem. Based on the callsites, this variable is utilized within the Engine module, particularly in the GPUSkinCache component.

The value of this variable is set through the engine’s configuration system, as indicated by the UPROPERTY(globalconfig) decorator in the Engine.h file. This means it can be adjusted in the engine’s configuration files or through the project settings in the Unreal Editor.

This variable interacts with other related variables such as:

Developers should be aware that this variable is used in conjunction with memory thresholds to determine the color representation of memory usage in the GPU Skin Cache visualization system. It’s specifically used to represent high memory usage scenarios.

Best practices when using this variable include:

  1. Ensure the color chosen provides good contrast with other visualization colors for clear differentiation.
  2. Consider accessibility and color blindness when selecting colors.
  3. Use this variable in conjunction with the related threshold variables to create a meaningful visualization of memory usage.
  4. Be consistent with color choices across different visualization modes and features to maintain a cohesive debugging experience.
  5. Document any custom color schemes used in the project to aid other team members in interpreting the visualizations.

#Setting Variables

#References In INI files

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

Scope (from outer to inner):

file
class        class UEngine : public UObject , public FExec

Source code excerpt:

	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:2528

Scope (from outer to inner):

file
function     void FGPUSkinCache::DrawVisualizationInfoText

Source code excerpt:

			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);
			const TArray<FLinearColor>& VisualizationColors = GEngine->GPUSkinCacheVisualizationRayTracingLODOffsetColors;