UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
ShaderPrint Namespace Reference

Classes

class  FEmptyBuffer
 
class  FLineIndexBuffer
 
struct  FQueuedRenderItem
 
class  FShaderBuildIndirectDispatchArgsCS
 
class  FShaderBuildIndirectDrawArgsCS
 
class  FShaderBuildSymbolBufferCS
 
class  FShaderCompactStateBufferCS
 
class  FShaderDrawDebugCopyCS
 
class  FShaderDrawDebugPS
 
class  FShaderDrawDebugVS
 
class  FShaderDrawSymbols
 
class  FShaderDrawSymbolsPS
 
class  FShaderDrawSymbolsVS
 
class  FShaderPrintClearCounterCS
 
class  FShaderPrintCopyCS
 
struct  FShaderPrintRequest
 
struct  FShaderPrintSetup
 
class  FShaderPrintUploadCS
 
class  FShaderZoomCS
 
struct  FStrings
 
class  FTriangleIndexBuffer
 

Functions

 IMPLEMENT_GLOBAL_SHADER_PARAMETER_STRUCT (FShaderPrintCommonParameters, "ShaderPrintData")
 
void GetParameters (FShaderPrintSetup const &InSetup, FShaderPrintCommonParameters &OutParameters)
 
void SetParameters (FRDGBuilder &GraphBuilder, const FShaderPrintData &InData, FShaderParameters &OutParameters)
 
void SetParameters (FRDGBuilder &GraphBuilder, FShaderParameters &OutParameters)
 
void SetParameters (FRDGBuilder &GraphBuilder, const FViewInfo &View, FShaderParameters &OutParameters)
 
bool IsSupported (EShaderPlatform InShaderPlatform)
 
void ModifyCompilationEnvironment (const EShaderPlatform Platform, FShaderCompilerEnvironment &OutEnvironment)
 
void ModifyCompilationEnvironment (const FGlobalShaderPermutationParameters &Parameters, FShaderCompilerEnvironment &OutEnvironment)
 
bool IsEnabled ()
 
void SetEnabled (bool bInEnabled)
 
bool IsValid (FShaderPrintData const &InShaderPrintData)
 
bool IsEnabled (FShaderPrintData const &InShaderPrintData)
 
bool IsDefaultViewValid ()
 
bool IsDefaultViewEnabled ()
 
void RequestSpaceForCharacters (uint32 InCount)
 
void RequestSpaceForLines (uint32 InCount)
 
void RequestSpaceForTriangles (uint32 InCount)
 
void SubmitShaderPrintData (FFrozenShaderPrintData &InData, FSceneInterface const *InScene)
 
void SubmitShaderPrintData (FFrozenShaderPrintData &InData)
 
 IMPLEMENT_GLOBAL_SHADER (FShaderPrintUploadCS, "/Engine/Private/ShaderPrintDraw.usf", "UploadCS", SF_Compute)
 
 IMPLEMENT_GLOBAL_SHADER (FShaderPrintCopyCS, "/Engine/Private/ShaderPrintDraw.usf", "CopyCS", SF_Compute)
 
 IMPLEMENT_GLOBAL_SHADER (FShaderPrintClearCounterCS, "/Engine/Private/ShaderPrintDraw.usf", "ClearCounterCS", SF_Compute)
 
 IMPLEMENT_GLOBAL_SHADER (FShaderBuildIndirectDispatchArgsCS, "/Engine/Private/ShaderPrintDraw.usf", "BuildIndirectDispatchArgsCS", SF_Compute)
 
 IMPLEMENT_GLOBAL_SHADER (FShaderCompactStateBufferCS, "/Engine/Private/ShaderPrintDraw.usf", "CompactStateBufferCS", SF_Compute)
 
 IMPLEMENT_GLOBAL_SHADER (FShaderBuildSymbolBufferCS, "/Engine/Private/ShaderPrintDraw.usf", "BuildSymbolBufferCS", SF_Compute)
 
 IMPLEMENT_GLOBAL_SHADER (FShaderBuildIndirectDrawArgsCS, "/Engine/Private/ShaderPrintDraw.usf", "BuildIndirectDrawArgsCS", SF_Compute)
 
 IMPLEMENT_GLOBAL_SHADER (FShaderDrawSymbolsVS, "/Engine/Private/ShaderPrintDraw.usf", "DrawSymbolsVS", SF_Vertex)
 
 IMPLEMENT_GLOBAL_SHADER (FShaderDrawSymbolsPS, "/Engine/Private/ShaderPrintDraw.usf", "DrawSymbolsPS", SF_Pixel)
 
 IMPLEMENT_GLOBAL_SHADER (FShaderDrawDebugCopyCS, "/Engine/Private/ShaderPrintDrawPrimitive.usf", "ShaderDrawDebugCopyCS", SF_Compute)
 
 IMPLEMENT_GLOBAL_SHADER (FShaderDrawDebugVS, "/Engine/Private/ShaderPrintDrawPrimitive.usf", "ShaderDrawDebugVS", SF_Vertex)
 
 IMPLEMENT_GLOBAL_SHADER (FShaderDrawDebugPS, "/Engine/Private/ShaderPrintDrawPrimitive.usf", "ShaderDrawDebugPS", SF_Pixel)
 
 IMPLEMENT_GLOBAL_SHADER (FShaderZoomCS, "/Engine/Private/ShaderPrintDraw.usf", "DrawZoomCS", SF_Compute)
 
FShaderPrintData CreateShaderPrintData (FRDGBuilder &GraphBuilder, FShaderPrintSetup const &InSetup, FSceneViewState *InViewState)
 
FShaderPrintData CreateShaderPrintData (FRDGBuilder &GraphBuilder, FShaderPrintSetup const &InSetup)
 
FFrozenShaderPrintData FreezeShaderPrintData (FRDGBuilder &GraphBuilder, FShaderPrintData &ShaderPrintData)
 
FShaderPrintData UnFreezeShaderPrintData (FRDGBuilder &GraphBuilder, FFrozenShaderPrintData &FrozenShaderPrintData)
 
void BeginView (FRDGBuilder &GraphBuilder, FViewInfo &View)
 
void BeginViews (FRDGBuilder &GraphBuilder, TArrayView< FViewInfo > Views)
 
void DrawView (FRDGBuilder &GraphBuilder, const FViewInfo &View, const FScreenPassTexture &OutputTexture, const FScreenPassTexture &DepthTexture)
 
void EndViews (TArrayView< FViewInfo > Views)
 

Variables

FBufferWithRDGGEmptyBuffer = new TGlobalResource<FEmptyBuffer>()
 
TGlobalResource< FLineIndexBuffer, FRenderResource::EInitPhase::PreGLineIndexBuffer
 
TGlobalResource< FTriangleIndexBuffer, FRenderResource::EInitPhase::PreGTriangleIndexBuffer
 

Function Documentation

◆ BeginView()

void ShaderPrint::BeginView ( FRDGBuilder GraphBuilder,
FViewInfo View 
)

◆ BeginViews()

void ShaderPrint::BeginViews ( FRDGBuilder GraphBuilder,
TArrayView< FViewInfo Views 
)

◆ CreateShaderPrintData() [1/2]

RENDERER_API FShaderPrintData ShaderPrint::CreateShaderPrintData ( FRDGBuilder GraphBuilder,
FShaderPrintSetup const &  InSetup 
)

Create the shader print render data. This allocates and clears the render buffers.

◆ CreateShaderPrintData() [2/2]

FShaderPrintData ShaderPrint::CreateShaderPrintData ( FRDGBuilder GraphBuilder,
FShaderPrintSetup const &  InSetup,
FSceneViewState InViewState 
)

◆ DrawView()

void ShaderPrint::DrawView ( FRDGBuilder GraphBuilder,
const FViewInfo View,
const FScreenPassTexture OutputTexture,
const FScreenPassTexture DepthTexture 
)

◆ EndViews()

void ShaderPrint::EndViews ( TArrayView< FViewInfo Views)

◆ FreezeShaderPrintData()

RENDERER_API FFrozenShaderPrintData ShaderPrint::FreezeShaderPrintData ( FRDGBuilder GraphBuilder,
FShaderPrintData ShaderPrintData 
)

Make the buffers in a FShaderPrintData object external to an RDG builder. Do this for later reuse, or when submiting for later rendering.

◆ GetParameters()

RENDERER_API void ShaderPrint::GetParameters ( FShaderPrintSetup const &  InSetup,
FShaderPrintCommonParameters OutParameters 
)

Fill the ShaderPrintCommonParameters uniform buffer structure for our setup.

◆ IMPLEMENT_GLOBAL_SHADER() [1/13]

ShaderPrint::IMPLEMENT_GLOBAL_SHADER ( FShaderBuildIndirectDispatchArgsCS  ,
"/Engine/Private/ShaderPrintDraw.usf"  ,
"BuildIndirectDispatchArgsCS"  ,
SF_Compute   
)

◆ IMPLEMENT_GLOBAL_SHADER() [2/13]

ShaderPrint::IMPLEMENT_GLOBAL_SHADER ( FShaderBuildIndirectDrawArgsCS  ,
"/Engine/Private/ShaderPrintDraw.usf"  ,
"BuildIndirectDrawArgsCS"  ,
SF_Compute   
)

◆ IMPLEMENT_GLOBAL_SHADER() [3/13]

ShaderPrint::IMPLEMENT_GLOBAL_SHADER ( FShaderBuildSymbolBufferCS  ,
"/Engine/Private/ShaderPrintDraw.usf"  ,
"BuildSymbolBufferCS"  ,
SF_Compute   
)

◆ IMPLEMENT_GLOBAL_SHADER() [4/13]

ShaderPrint::IMPLEMENT_GLOBAL_SHADER ( FShaderCompactStateBufferCS  ,
"/Engine/Private/ShaderPrintDraw.usf"  ,
"CompactStateBufferCS"  ,
SF_Compute   
)

◆ IMPLEMENT_GLOBAL_SHADER() [5/13]

ShaderPrint::IMPLEMENT_GLOBAL_SHADER ( FShaderDrawDebugCopyCS  ,
"/Engine/Private/ShaderPrintDrawPrimitive.usf"  ,
"ShaderDrawDebugCopyCS"  ,
SF_Compute   
)

◆ IMPLEMENT_GLOBAL_SHADER() [6/13]

ShaderPrint::IMPLEMENT_GLOBAL_SHADER ( FShaderDrawDebugPS  ,
"/Engine/Private/ShaderPrintDrawPrimitive.usf"  ,
"ShaderDrawDebugPS"  ,
SF_Pixel   
)

◆ IMPLEMENT_GLOBAL_SHADER() [7/13]

ShaderPrint::IMPLEMENT_GLOBAL_SHADER ( FShaderDrawDebugVS  ,
"/Engine/Private/ShaderPrintDrawPrimitive.usf"  ,
"ShaderDrawDebugVS"  ,
SF_Vertex   
)

◆ IMPLEMENT_GLOBAL_SHADER() [8/13]

ShaderPrint::IMPLEMENT_GLOBAL_SHADER ( FShaderDrawSymbolsPS  ,
"/Engine/Private/ShaderPrintDraw.usf"  ,
"DrawSymbolsPS"  ,
SF_Pixel   
)

◆ IMPLEMENT_GLOBAL_SHADER() [9/13]

ShaderPrint::IMPLEMENT_GLOBAL_SHADER ( FShaderDrawSymbolsVS  ,
"/Engine/Private/ShaderPrintDraw.usf"  ,
"DrawSymbolsVS"  ,
SF_Vertex   
)

◆ IMPLEMENT_GLOBAL_SHADER() [10/13]

ShaderPrint::IMPLEMENT_GLOBAL_SHADER ( FShaderPrintClearCounterCS  ,
"/Engine/Private/ShaderPrintDraw.usf"  ,
"ClearCounterCS"  ,
SF_Compute   
)

◆ IMPLEMENT_GLOBAL_SHADER() [11/13]

ShaderPrint::IMPLEMENT_GLOBAL_SHADER ( FShaderPrintCopyCS  ,
"/Engine/Private/ShaderPrintDraw.usf"  ,
"CopyCS"  ,
SF_Compute   
)

◆ IMPLEMENT_GLOBAL_SHADER() [12/13]

ShaderPrint::IMPLEMENT_GLOBAL_SHADER ( FShaderPrintUploadCS  ,
"/Engine/Private/ShaderPrintDraw.usf"  ,
"UploadCS"  ,
SF_Compute   
)

◆ IMPLEMENT_GLOBAL_SHADER() [13/13]

ShaderPrint::IMPLEMENT_GLOBAL_SHADER ( FShaderZoomCS  ,
"/Engine/Private/ShaderPrintDraw.usf"  ,
"DrawZoomCS"  ,
SF_Compute   
)

◆ IMPLEMENT_GLOBAL_SHADER_PARAMETER_STRUCT()

ShaderPrint::IMPLEMENT_GLOBAL_SHADER_PARAMETER_STRUCT ( FShaderPrintCommonParameters  ,
"ShaderPrintData"   
)

◆ IsDefaultViewEnabled()

RENDERER_API bool ShaderPrint::IsDefaultViewEnabled ( )

◆ IsDefaultViewValid()

RENDERER_API bool ShaderPrint::IsDefaultViewValid ( )

◆ IsEnabled() [1/2]

RENDERER_API bool ShaderPrint::IsEnabled ( )

◆ IsEnabled() [2/2]

RENDERER_API bool ShaderPrint::IsEnabled ( FShaderPrintData const &  InShaderPrintData)

◆ IsSupported()

RENDERER_API bool ShaderPrint::IsSupported ( EShaderPlatform  InShaderPlatform)

◆ IsValid()

RENDERER_API bool ShaderPrint::IsValid ( FShaderPrintData const &  InShaderPrintData)

◆ ModifyCompilationEnvironment() [1/2]

RENDERER_API void ShaderPrint::ModifyCompilationEnvironment ( const EShaderPlatform  Platform,
FShaderCompilerEnvironment OutEnvironment 
)

◆ ModifyCompilationEnvironment() [2/2]

RENDERER_API void ShaderPrint::ModifyCompilationEnvironment ( const FGlobalShaderPermutationParameters Parameters,
FShaderCompilerEnvironment OutEnvironment 
)

◆ RequestSpaceForCharacters()

RENDERER_API void ShaderPrint::RequestSpaceForCharacters ( uint32  MaxElementCount)

Call to ensure enough space for some number of characters, is added cumulatively each frame, to make it possible for several systems to request a certain number independently. Is used to grow the max element count for subsequent frames (as the allocation happens early in the frame).

Parameters
Thenumber of characters requested.

◆ RequestSpaceForLines()

RENDERER_API void ShaderPrint::RequestSpaceForLines ( uint32  MaxElementCount)

Call to ensure enough space for some number of lines segments, is added cumulatively each frame, to make it possible for several systems to request a certain number independently. Is used to grow the max element count for subsequent frames (as the allocation happens early in the frame).

Parameters
Thenumber of line segments requested.

◆ RequestSpaceForTriangles()

RENDERER_API void ShaderPrint::RequestSpaceForTriangles ( uint32  MaxElementCount)

Call to ensure enough space for some number of solid triangles, is added cumulatively each frame, to make it possible for several systems to request a certain number independently. Is used to grow the max element count for subsequent frames (as the allocation happens early in the frame).

Parameters
Thenumber of triangles requested.

◆ SetEnabled()

RENDERER_API void ShaderPrint::SetEnabled ( bool  bInEnabled)

◆ SetParameters() [1/3]

RENDERER_API void ShaderPrint::SetParameters ( FRDGBuilder GraphBuilder,
FShaderPrintData const &  InData,
FShaderParameters OutParameters 
)

Fill the FShaderParameters with an explicit FShaderPrintData managed by the calling code.

◆ SetParameters() [2/3]

void ShaderPrint::SetParameters ( FRDGBuilder GraphBuilder,
const FViewInfo View,
FShaderParameters OutParameters 
)

◆ SetParameters() [3/3]

RENDERER_API void ShaderPrint::SetParameters ( FRDGBuilder GraphBuilder,
FShaderParameters OutParameters 
)

Fill the FShaderParameters with the opaque FShaderPrintData from the current default view.

◆ SubmitShaderPrintData() [1/2]

RENDERER_API void ShaderPrint::SubmitShaderPrintData ( FFrozenShaderPrintData InData)

◆ SubmitShaderPrintData() [2/2]

RENDERER_API void ShaderPrint::SubmitShaderPrintData ( FFrozenShaderPrintData InData,
FSceneInterface const *  InScene 
)

Submit shader print data for display in the next rendered frame. The data is displayed in views from the scene, or all views if InScene==nullptr.

◆ UnFreezeShaderPrintData()

RENDERER_API FShaderPrintData ShaderPrint::UnFreezeShaderPrintData ( FRDGBuilder GraphBuilder,
FFrozenShaderPrintData FrozenShaderPrintData 
)

Import the shader print buffers into an RDG builder and recreate the FShaderPrintData object.

Variable Documentation

◆ GEmptyBuffer

FBufferWithRDG* ShaderPrint::GEmptyBuffer = new TGlobalResource<FEmptyBuffer>()

◆ GLineIndexBuffer

◆ GTriangleIndexBuffer