UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
DebugViewModeInterface.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3/*=============================================================================
4DebugViewModeInterface.h: Contains definitions for rendering debug viewmodes.
5=============================================================================*/
6
7#pragma once
8
9#include "CoreMinimal.h"
11#include "Engine/EngineTypes.h"
12#include "RHI.h"
13#include "Shader.h"
14#include "DrawDebugHelpers.h"
15
16#if ENABLE_DRAW_DEBUG
17
19class FMaterial;
26
28{
29public:
30
40
43
45
49
50 ENGINE_API virtual void SetDrawRenderState(EDebugViewShaderMode DebugViewMode, EBlendMode BlendMode, FRenderState& DrawRenderState, bool bHasDepthPrepassForMaskedMaterial) const;
51
54 const FPrimitiveSceneProxy* PrimitiveSceneProxy,
55 const FMaterialRenderProxy& MaterialRenderProxy,
56 const FMaterial& Material,
57 EDebugViewShaderMode DebugViewMode,
58 const FVector& ViewOrigin,
59 int32 VisualizeLODIndex,
60 const FColor& SkinCacheDebugColor,
61 int32 VisualizeElementIndex,
66 int32 ViewModeParam,
67 FName ViewModeParamName,
68 FMeshDrawSingleShaderBindings& ShaderBindings
69 ) const {}
70
73 {
74 return (uint32)InDebugViewMode < DVSM_MAX ? Singleton : nullptr;
75 }
76
79
82 static ENGINE_API bool AllowFallbackToDefaultMaterial(bool bHasVertexPositionOffsetConnected, bool bHasPixelDepthOffsetConnected);
83
84private:
85
86 static ENGINE_API FDebugViewModeInterface* Singleton;
87};
88
89#endif // ENABLE_DRAW_DEBUG
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
EDebugViewShaderMode
Definition DebugViewModeHelpers.h:23
@ DVSM_MAX
Definition DebugViewModeHelpers.h:38
EBlendMode
Definition EngineTypes.h:245
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition DebugViewModeInterface.h:28
virtual void GetDebugViewModeShaderBindings(const FDebugViewModePS &Shader, const FPrimitiveSceneProxy *PrimitiveSceneProxy, const FMaterialRenderProxy &MaterialRenderProxy, const FMaterial &Material, EDebugViewShaderMode DebugViewMode, const FVector &ViewOrigin, int32 VisualizeLODIndex, const FColor &SkinCacheDebugColor, int32 VisualizeElementIndex, int32 NumVSInstructions, int32 NumPSInstructions, int32 LWCComplexityVS, int32 LWCComplexityPS, int32 ViewModeParam, FName ViewModeParamName, FMeshDrawSingleShaderBindings &ShaderBindings) const
Definition DebugViewModeInterface.h:52
static const FDebugViewModeInterface * GetInterface(EDebugViewShaderMode InDebugViewMode)
Definition DebugViewModeInterface.h:72
virtual void AddShaderTypes(ERHIFeatureLevel::Type InFeatureLevel, const FVertexFactoryType *InVertexFactoryType, FMaterialShaderTypes &OutShaderTypes) const =0
static ENGINE_API bool AllowFallbackToDefaultMaterial(const FMaterial *InMaterial)
virtual ENGINE_API void SetDrawRenderState(EDebugViewShaderMode DebugViewMode, EBlendMode BlendMode, FRenderState &DrawRenderState, bool bHasDepthPrepassForMaskedMaterial) const
static ENGINE_API bool AllowFallbackToDefaultMaterial(bool bHasVertexPositionOffsetConnected, bool bHasPixelDepthOffsetConnected)
virtual ~FDebugViewModeInterface()
Definition DebugViewModeInterface.h:44
FDebugViewModeInterface()
Definition DebugViewModeInterface.h:41
static ENGINE_API void SetInterface(FDebugViewModeInterface *Interface)
Definition MaterialRenderProxy.h:102
Definition MaterialShared.h:2058
Definition MeshDrawShaderBindings.h:104
Definition NameTypes.h:617
Definition PrimitiveSceneProxy.h:296
Definition RHIResources.h:696
Definition RHIResources.h:686
Definition VertexFactory.h:314
Type
Definition RHIFeatureLevel.h:20
Definition Color.h:486
Definition DebugViewModeInterface.h:32
FRenderState()
Definition DebugViewModeInterface.h:33
FRHIDepthStencilState * DepthStencilState
Definition DebugViewModeInterface.h:38
FRHIBlendState * BlendState
Definition DebugViewModeInterface.h:37
Definition MaterialShaderType.h:198
Definition MeshPassProcessor.h:2118