GPUSkinCacheVisualizationLowMemoryColor

GPUSkinCacheVisualizationLowMemoryColor

#Overview

name: GPUSkinCacheVisualizationLowMemoryColor

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 GPUSkinCacheVisualizationLowMemoryColor is to define a color for visualizing low memory usage in the GPU Skin Cache system of Unreal Engine 5. This variable is part of a set of color variables used to represent different levels of memory usage in the GPU Skin Cache visualization.

This setting variable is primarily used by the Engine and GPUSkinCache subsystems of Unreal Engine 5. It is defined in the UEngine class and utilized in the GPUSkinCache implementation.

The value of this variable is set through the global configuration system, as indicated by the UPROPERTY(globalconfig) decorator in the Engine.h file.

GPUSkinCacheVisualizationLowMemoryColor interacts with other related variables, specifically:

These variables work together to create a color-coded visualization of memory usage in the GPU Skin Cache system.

Developers should be aware that this variable is used in conjunction with memory thresholds to determine the color representation of memory usage. The actual color displayed depends on the amount of memory used by the GPU Skin Cache in relation to the defined thresholds.

Best practices when using this variable include:

  1. Ensuring that the chosen color provides good contrast with other visualization colors for clear differentiation.
  2. Coordinating the color choices with the mid and high memory colors for a coherent visualization scheme.
  3. Considering color-blind accessibility when selecting colors for visualization.
  4. Adjusting the color if needed to fit with the overall visual style of debugging tools in the project.

#Setting Variables

#References In INI files

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

Scope (from outer to inner):

file
class        class UEngine : public UObject , public FExec

Source code excerpt:

	/** The memory visualization colors of skin cache */
	UPROPERTY(globalconfig)
	FLinearColor GPUSkinCacheVisualizationLowMemoryColor;
	UPROPERTY(globalconfig)
	FLinearColor GPUSkinCacheVisualizationMidMemoryColor;
	UPROPERTY(globalconfig)
	FLinearColor GPUSkinCacheVisualizationHighMemoryColor;

	/** The visualization colors of ray tracing LOD index offset from raster LOD */

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

Scope (from outer to inner):

file
function     FColor FGPUSkinCache::GetVisualizationDebugColor

Source code excerpt:

			float MemoryInMB = MemoryInBytes / MBSize;

			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;

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

Scope (from outer to inner):

file
function     void FGPUSkinCache::DrawVisualizationInfoText

Source code excerpt:

			DrawText(FString::Printf(TEXT("Total Used: %.2fMB"), UsedMemoryInMB), FColor::White);
			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