GPUSkinCacheVisualizationLowMemoryThresholdInMB
GPUSkinCacheVisualizationLowMemoryThresholdInMB
#Overview
name: GPUSkinCacheVisualizationLowMemoryThresholdInMB
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 GPUSkinCacheVisualizationLowMemoryThresholdInMB is to define a threshold for low memory usage in the GPU Skin Cache visualization system. It is used as part of the rendering system, specifically for visualizing and managing memory usage in GPU-based character skinning.
This setting variable is primarily used in the Engine module, particularly within the GPU Skin Cache subsystem. It is referenced in the UEngine class and the FGPUSkinCache implementation.
The value of this variable is set through global configuration, as indicated by the UPROPERTY(globalconfig) decorator in the UEngine class definition.
GPUSkinCacheVisualizationLowMemoryThresholdInMB interacts with several other variables:
- GPUSkinCacheVisualizationHighMemoryThresholdInMB
- GPUSkinCacheVisualizationLowMemoryColor
- GPUSkinCacheVisualizationMidMemoryColor
- GPUSkinCacheVisualizationHighMemoryColor
These variables work together to define thresholds and colors for visualizing memory usage in the GPU Skin Cache.
Developers should be aware that this variable is used to determine the color representation of memory usage in the visualization system. It acts as the lower bound for what is considered “low” memory usage.
Best practices when using this variable include:
- Ensuring it is set to a value that makes sense for your project’s memory requirements and hardware targets.
- Coordinating its value with GPUSkinCacheVisualizationHighMemoryThresholdInMB to create meaningful low, mid, and high memory usage ranges.
- Using it in conjunction with the associated color variables to create an intuitive visualization scheme.
- Regularly monitoring and adjusting these thresholds based on performance metrics and user feedback to maintain optimal performance and visual clarity in the debug visualization.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseEngine.ini:266, section: [/Script/Engine.Engine]
- INI Section:
/Script/Engine.Engine
- Raw value:
2.0
- Is Array:
False
#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:1232
Scope (from outer to inner):
file
class class UEngine : public UObject , public FExec
Source code excerpt:
/** The memory visualization threshold in MB for a skin cache entry */
UPROPERTY(globalconfig)
float GPUSkinCacheVisualizationLowMemoryThresholdInMB;
UPROPERTY(globalconfig)
float GPUSkinCacheVisualizationHighMemoryThresholdInMB;
/** The memory visualization colors of skin cache */
UPROPERTY(globalconfig)
FLinearColor GPUSkinCacheVisualizationLowMemoryColor;
#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:2521
Scope (from outer to inner):
file
function void FGPUSkinCache::DrawVisualizationInfoText
Source code excerpt:
float AvailableMemoryInMB = GSkinCacheSceneMemoryLimitInMB - UsedMemoryInMB;
FString LowMemoryText = FString::Printf(TEXT("0 - %dMB"), GEngine->GPUSkinCacheVisualizationLowMemoryThresholdInMB);
DrawText(TEXT("Skin Cache Visualization - Memory"), FColor::White);
DrawText(FString::Printf(TEXT("Total Limit: %.2fMB"), GSkinCacheSceneMemoryLimitInMB), FColor::White);
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
DrawText(TEXT("Skin Cache Visualization - RayTracingLODOffset"), FColor::White);