UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
DebugViewModeHelpers.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
7#pragma once
8
9#include "CoreMinimal.h"
10
11#define WITH_DEBUG_VIEW_MODES (WITH_EDITOR || !(UE_BUILD_SHIPPING || UE_BUILD_TEST))
12
13struct FSlowTask;
16namespace ERHIFeatureLevel { enum Type : int; }
17namespace EMaterialQualityLevel { enum Type : uint8; }
18
23{
24 DVSM_None, // No debug view.
25 DVSM_ShaderComplexity, // Default shader complexity viewmode
26 DVSM_ShaderComplexityContainedQuadOverhead, // Show shader complexity with quad overdraw scaling the PS instruction count.
27 DVSM_ShaderComplexityBleedingQuadOverhead, // Show shader complexity with quad overdraw bleeding the PS instruction count over the quad.
28 DVSM_QuadComplexity, // Show quad overdraw only.
29 DVSM_PrimitiveDistanceAccuracy, // Visualize the accuracy of the primitive distance computed for texture streaming.
30 DVSM_MeshUVDensityAccuracy, // Visualize the accuracy of the mesh UV densities computed for texture streaming.
31 DVSM_MaterialTextureScaleAccuracy, // Visualize the accuracy of the material texture scales used for texture streaming.
32 DVSM_OutputMaterialTextureScales, // Outputs the material texture scales.
33 DVSM_RequiredTextureResolution, // Visualize the accuracy of the streamed texture resolution.
34 DVSM_LODColoration, // Visualize primitive LOD .
35 DVSM_VisualizeGPUSkinCache, // Visualize various properties of Skin Cache.
36 DVSM_LWCComplexity, // Visualize usage of LWC functions in materials.
37 DVSM_ShadowCasters, // Visualize shadow casters
39};
40
42
43#if WITH_DEBUG_VIEW_MODES
52#else
53inline bool IsDebugViewShaderModeODSCOnly() { return false; }
54inline bool SupportDebugViewModes() { return false; }
57#endif
58
FPlatformTypes::TCHAR TCHAR
Either ANSICHAR or WIDECHAR, depending on whether the platform supports wide characters or the requir...
Definition Platform.h:1135
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
#define OUT
Definition Platform.h:897
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
ENGINE_API bool SupportDebugViewModes()
ENGINE_API bool WaitForShaderCompilation(const FText &Message, FSlowTask *ProgressTask)
Definition DebugViewModeHelpers.cpp:171
ENGINE_API bool SupportDebugViewShaderMode(EDebugViewShaderMode ShaderMode, EShaderPlatform Platform)
ENGINE_API bool GetUsedMaterialsInWorld(UWorld *InWorld, OUT TSet< UMaterialInterface * > &OutMaterials, FSlowTask *Task)
Definition DebugViewModeHelpers.cpp:225
ENGINE_API bool AllowDebugViewShaderMode(EDebugViewShaderMode ShaderMode, EShaderPlatform Platform, ERHIFeatureLevel::Type FeatureLevel)
ENGINE_API bool IsDebugViewShaderModeODSCOnly()
ENGINE_API int32 GetNumActorsInWorld(UWorld *InWorld)
Definition DebugViewModeHelpers.cpp:155
ENGINE_API bool CompileDebugViewModeShaders(EDebugViewShaderMode Mode, EMaterialQualityLevel::Type QualityLevel, ERHIFeatureLevel::Type FeatureLevel, TSet< UMaterialInterface * > &Materials, FSlowTask *ProgressTask)
Definition DebugViewModeHelpers.cpp:310
EDebugViewShaderMode
Definition DebugViewModeHelpers.h:23
@ DVSM_OutputMaterialTextureScales
Definition DebugViewModeHelpers.h:32
@ DVSM_ShadowCasters
Definition DebugViewModeHelpers.h:37
@ DVSM_LODColoration
Definition DebugViewModeHelpers.h:34
@ DVSM_PrimitiveDistanceAccuracy
Definition DebugViewModeHelpers.h:29
@ DVSM_MeshUVDensityAccuracy
Definition DebugViewModeHelpers.h:30
@ DVSM_ShaderComplexityContainedQuadOverhead
Definition DebugViewModeHelpers.h:26
@ DVSM_ShaderComplexityBleedingQuadOverhead
Definition DebugViewModeHelpers.h:27
@ DVSM_RequiredTextureResolution
Definition DebugViewModeHelpers.h:33
@ DVSM_MaterialTextureScaleAccuracy
Definition DebugViewModeHelpers.h:31
@ DVSM_ShaderComplexity
Definition DebugViewModeHelpers.h:25
@ DVSM_QuadComplexity
Definition DebugViewModeHelpers.h:28
@ DVSM_None
Definition DebugViewModeHelpers.h:24
@ DVSM_MAX
Definition DebugViewModeHelpers.h:38
@ DVSM_VisualizeGPUSkinCache
Definition DebugViewModeHelpers.h:35
@ DVSM_LWCComplexity
Definition DebugViewModeHelpers.h:36
ENGINE_API const TCHAR * DebugViewShaderModeToString(EDebugViewShaderMode InShaderMode)
Definition DebugViewModeHelpers.cpp:26
EShaderPlatform
Definition RHIShaderPlatform.h:11
uint8_t uint8
Definition binka_ue_file_header.h:8
uint16_t uint16
Definition binka_ue_file_header.h:7
Definition Text.h:385
Definition MaterialInterface.h:296
Definition World.h:918
Definition DebugViewModeHelpers.h:17
Type
Definition SceneTypes.h:132
Definition SceneComponent.h:24
Type
Definition RHIFeatureLevel.h:20
Definition SlowTask.h:29