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
15class FRDGBuilder;
16class FViewInfo;
18
19namespace 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
27}
Definition RenderGraphBuilder.h:49
Definition SceneRendering.h:1132
Definition ArrayView.h:139
Definition ShaderPrint.cpp:22
void BeginViews(FRDGBuilder &GraphBuilder, TArrayView< FViewInfo > Views)
Definition ShaderPrint.cpp:923
void EndViews(TArrayView< FViewInfo > Views)
Definition ShaderPrint.cpp:1291
void DrawView(FRDGBuilder &GraphBuilder, const FViewInfo &View, const FScreenPassTexture &OutputTexture, const FScreenPassTexture &DepthTexture)
Definition ShaderPrint.cpp:1274
Definition ScreenPass.h:41