UDocumentation
UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
ShaderPrint.h
Go to the documentation of this file.
1
// Copyright Epic Games, Inc. All Rights Reserved.
2
3
// Use ShaderPrint to debug print from any shader type.
4
// Call BeginViews() at the start of a view group to init the debug output buffer.
5
// Call DrawView() to composite the debug data to the final render target.
6
// Call EndViews() at the end of the view group to tidy up.
7
8
// The shader HLSL code should include the ShaderPrintCommon.ush and use the ShaderPrint*() functions.
9
// The shader C++ code needs to bind the buffers required to capture the debug print. See ShaderPrintParameters.h for this.
10
11
#pragma once
12
13
#include "
CoreMinimal.h
"
14
15
class
FRDGBuilder
;
16
class
FViewInfo
;
17
struct
FScreenPassTexture
;
18
19
namespace
ShaderPrint
20
{
21
// Allocate the debug print buffer associated with the view
22
void
BeginViews
(
FRDGBuilder
& GraphBuilder,
TArrayView<FViewInfo>
Views);
23
// Draw info from the debug print buffer to the given output target
24
void
DrawView
(
FRDGBuilder
& GraphBuilder,
const
FViewInfo
& View,
const
FScreenPassTexture
& OutputTexture,
const
FScreenPassTexture
& DepthTexture);
25
// Release the debug print buffer associated with the view
26
void
EndViews
(
TArrayView<FViewInfo>
Views);
27
}
CoreMinimal.h
FRDGBuilder
Definition
RenderGraphBuilder.h:49
FViewInfo
Definition
SceneRendering.h:1132
TArrayView
Definition
ArrayView.h:139
ShaderPrint
Definition
ShaderPrint.cpp:22
ShaderPrint::BeginViews
void BeginViews(FRDGBuilder &GraphBuilder, TArrayView< FViewInfo > Views)
Definition
ShaderPrint.cpp:923
ShaderPrint::EndViews
void EndViews(TArrayView< FViewInfo > Views)
Definition
ShaderPrint.cpp:1291
ShaderPrint::DrawView
void DrawView(FRDGBuilder &GraphBuilder, const FViewInfo &View, const FScreenPassTexture &OutputTexture, const FScreenPassTexture &DepthTexture)
Definition
ShaderPrint.cpp:1274
FScreenPassTexture
Definition
ScreenPass.h:41
Engine
Source
Runtime
Renderer
Private
ShaderPrint.h
Generated by
1.9.8