GPUSkinCacheVisualizationHighMemoryThresholdInMB
GPUSkinCacheVisualizationHighMemoryThresholdInMB
#Overview
name: GPUSkinCacheVisualizationHighMemoryThresholdInMB
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 GPUSkinCacheVisualizationHighMemoryThresholdInMB is to define a memory threshold for the GPU skin cache visualization system. It is used to categorize and visualize memory usage in the GPU skin cache, specifically to determine when memory usage is considered “high.”
This setting variable is primarily used by the Engine module, specifically within the GPU skin cache subsystem. It’s part of the rendering system, focusing on the visualization of GPU skin cache memory usage.
The value of this variable is set through the UEngine class, which is marked with the UPROPERTY(globalconfig) specifier. This means it can be configured globally through the engine’s configuration files.
GPUSkinCacheVisualizationHighMemoryThresholdInMB interacts with several other variables:
- GPUSkinCacheVisualizationLowMemoryThresholdInMB
- GPUSkinCacheVisualizationLowMemoryColor
- GPUSkinCacheVisualizationMidMemoryColor
- GPUSkinCacheVisualizationHighMemoryColor
These variables work together to define thresholds and colors for visualizing different levels of memory usage in the GPU skin cache.
Developers should be aware that this variable is used in conjunction with the low memory threshold to create three categories of memory usage: low, mid, and high. The actual memory usage is compared against these thresholds to determine which category it falls into, and the corresponding color is used for visualization.
Best practices when using this variable include:
- Ensure it’s set to a value that makes sense for your project’s GPU memory budget.
- Set it higher than the GPUSkinCacheVisualizationLowMemoryThresholdInMB to create a meaningful mid-range.
- Use it in conjunction with the other related variables to create a clear and informative visualization of GPU skin cache memory usage.
- Monitor and adjust this threshold based on performance metrics and the specific requirements of your game or application.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseEngine.ini:267, section: [/Script/Engine.Engine]
- INI Section:
/Script/Engine.Engine
- Raw value:
10.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:1234
Scope (from outer to inner):
file
class class UEngine : public UObject , public FExec
Source code excerpt:
float GPUSkinCacheVisualizationLowMemoryThresholdInMB;
UPROPERTY(globalconfig)
float GPUSkinCacheVisualizationHighMemoryThresholdInMB;
/** The memory visualization colors of skin cache */
UPROPERTY(globalconfig)
FLinearColor GPUSkinCacheVisualizationLowMemoryColor;
UPROPERTY(globalconfig)
FLinearColor GPUSkinCacheVisualizationMidMemoryColor;
#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);
const TArray<FLinearColor>& VisualizationColors = GEngine->GPUSkinCacheVisualizationRayTracingLODOffsetColors;