UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FPixelShaderUtils Struct Reference

#include <PixelShaderUtils.h>

Classes

class  FRasterizeToRectsVS
 

Static Public Member Functions

static RENDERCORE_API void DrawFullscreenTriangle (FRHICommandList &RHICmdList, uint32 InstanceCount=1)
 
static RENDERCORE_API void DrawFullscreenQuad (FRHICommandList &RHICmdList, uint32 InstanceCount=1)
 
static RENDERCORE_API void InitFullscreenPipelineState (FRHICommandList &RHICmdList, const FGlobalShaderMap *GlobalShaderMap, const TShaderRef< FShader > &PixelShader, FGraphicsPipelineStateInitializer &GraphicsPSOInit)
 
static RENDERCORE_API void InitFullscreenMultiviewportPipelineState (FRHICommandList &RHICmdList, const FGlobalShaderMap *GlobalShaderMap, const TShaderRef< FShader > &PixelShader, FGraphicsPipelineStateInitializer &GraphicsPSOInit)
 
template<typename TShaderClass >
static void DrawFullscreenPixelShader (FRHICommandList &RHICmdList, const FGlobalShaderMap *GlobalShaderMap, const TShaderRef< TShaderClass > &PixelShader, const typename TShaderClass::FParameters &Parameters, const FIntRect &Viewport, FRHIBlendState *BlendState=nullptr, FRHIRasterizerState *RasterizerState=nullptr, FRHIDepthStencilState *DepthStencilState=nullptr, uint32 StencilRef=0)
 
template<typename TShaderClass >
static void DrawFullscreenInstancedMultiViewportPixelShader (FRHICommandList &RHICmdList, const FGlobalShaderMap *GlobalShaderMap, const TShaderRef< TShaderClass > &PixelShader, const typename TShaderClass::FParameters &Parameters, TArrayView< FIntRect const > Viewports, FRHIBlendState *BlendState=nullptr, FRHIRasterizerState *RasterizerState=nullptr, FRHIDepthStencilState *DepthStencilState=nullptr, uint32 StencilRef=0)
 
template<typename TShaderClass >
static void AddFullscreenPass (FRDGBuilder &GraphBuilder, const FGlobalShaderMap *GlobalShaderMap, FRDGEventName &&PassName, const TShaderRef< TShaderClass > &PixelShader, typename TShaderClass::FParameters *Parameters, const FIntRect &Viewport, FRHIBlendState *BlendState=nullptr, FRHIRasterizerState *RasterizerState=nullptr, FRHIDepthStencilState *DepthStencilState=nullptr, uint32 StencilRef=0, ERDGPassFlags AdditionalPassFlags=ERDGPassFlags::None)
 
template<typename TShaderClass >
static void AddFullscreenInstancedMultiViewportPass (FRDGBuilder &GraphBuilder, const FGlobalShaderMap *GlobalShaderMap, FRDGEventName &&PassName, const TShaderRef< TShaderClass > &PixelShader, typename TShaderClass::FParameters *Parameters, TArray< FIntRect > &&Viewports, FRHIBlendState *BlendState=nullptr, FRHIRasterizerState *RasterizerState=nullptr, FRHIDepthStencilState *DepthStencilState=nullptr, uint32 StencilRef=0, ERDGPassFlags AdditionalPassFlags=ERDGPassFlags::None)
 
template<typename TPixelShaderClass , typename TPassParameters >
static void AddRasterizeToRectsPass (FRDGBuilder &GraphBuilder, const FGlobalShaderMap *GlobalShaderMap, FRDGEventName &&PassName, const TShaderRef< TPixelShaderClass > &PixelShader, TPassParameters *Parameters, FIntPoint ViewportSize, FRDGBufferSRVRef RectCoordBufferSRV, uint32 NumRects, FRHIBlendState *BlendState, FRHIRasterizerState *RasterizerState, FRHIDepthStencilState *DepthStencilState, uint32 StencilRef, FIntPoint TextureSize, FRDGBufferSRVRef RectUVBufferSRV, uint32 DownsampleFactor, const bool bSkipRenderPass)
 
template<typename TPixelShaderClass , typename TPassParameters >
static void AddRasterizeToRectsPass (FRDGBuilder &GraphBuilder, const FGlobalShaderMap *GlobalShaderMap, FRDGEventName &&PassName, const TShaderRef< TPixelShaderClass > &PixelShader, TPassParameters *Parameters, FIntPoint ViewportSize, FRDGBufferSRVRef RectCoordBufferSRV, uint32 NumRects, FRHIBlendState *BlendState=nullptr, FRHIRasterizerState *RasterizerState=nullptr, FRHIDepthStencilState *DepthStencilState=nullptr, uint32 StencilRef=0, FIntPoint TextureSize=FIntPoint(1, 1), FRDGBufferSRVRef RectUVBufferSRV=nullptr, uint32 DownsampleFactor=1, ERDGPassFlags AdditionalPassFlags=ERDGPassFlags::None, float DepthIncrement=0.0f)
 

Detailed Description

All utils for pixel shaders.

Member Function Documentation

◆ AddFullscreenInstancedMultiViewportPass()

template<typename TShaderClass >
static void FPixelShaderUtils::AddFullscreenInstancedMultiViewportPass ( FRDGBuilder GraphBuilder,
const FGlobalShaderMap GlobalShaderMap,
FRDGEventName &&  PassName,
const TShaderRef< TShaderClass > &  PixelShader,
typename TShaderClass::FParameters *  Parameters,
TArray< FIntRect > &&  Viewports,
FRHIBlendState BlendState = nullptr,
FRHIRasterizerState RasterizerState = nullptr,
FRHIDepthStencilState DepthStencilState = nullptr,
uint32  StencilRef = 0,
ERDGPassFlags  AdditionalPassFlags = ERDGPassFlags::None 
)
inlinestatic

Dispatch a pixel shader to render graph builder with its parameters.

◆ AddFullscreenPass()

template<typename TShaderClass >
static void FPixelShaderUtils::AddFullscreenPass ( FRDGBuilder GraphBuilder,
const FGlobalShaderMap GlobalShaderMap,
FRDGEventName &&  PassName,
const TShaderRef< TShaderClass > &  PixelShader,
typename TShaderClass::FParameters *  Parameters,
const FIntRect Viewport,
FRHIBlendState BlendState = nullptr,
FRHIRasterizerState RasterizerState = nullptr,
FRHIDepthStencilState DepthStencilState = nullptr,
uint32  StencilRef = 0,
ERDGPassFlags  AdditionalPassFlags = ERDGPassFlags::None 
)
inlinestatic

Dispatch a pixel shader to render graph builder with its parameters.

◆ AddRasterizeToRectsPass() [1/2]

static void FPixelShaderUtils::AddRasterizeToRectsPass ( FRDGBuilder GraphBuilder,
const FGlobalShaderMap GlobalShaderMap,
FRDGEventName &&  PassName,
const TShaderRef< TPixelShaderClass > &  PixelShader,
TPassParameters Parameters,
FIntPoint  ViewportSize,
FRDGBufferSRVRef  RectCoordBufferSRV,
uint32  NumRects,
FRHIBlendState BlendState,
FRHIRasterizerState RasterizerState,
FRHIDepthStencilState DepthStencilState,
uint32  StencilRef,
FIntPoint  TextureSize,
FRDGBufferSRVRef  RectUVBufferSRV,
uint32  DownsampleFactor,
const bool  bSkipRenderPass 
)
inlinestatic

Rect based pixel shader pass.

◆ AddRasterizeToRectsPass() [2/2]

static void FPixelShaderUtils::AddRasterizeToRectsPass ( FRDGBuilder GraphBuilder,
const FGlobalShaderMap GlobalShaderMap,
FRDGEventName &&  PassName,
const TShaderRef< TPixelShaderClass > &  PixelShader,
TPassParameters Parameters,
FIntPoint  ViewportSize,
FRDGBufferSRVRef  RectCoordBufferSRV,
uint32  NumRects,
FRHIBlendState BlendState = nullptr,
FRHIRasterizerState RasterizerState = nullptr,
FRHIDepthStencilState DepthStencilState = nullptr,
uint32  StencilRef = 0,
FIntPoint  TextureSize = FIntPoint(1, 1),
FRDGBufferSRVRef  RectUVBufferSRV = nullptr,
uint32  DownsampleFactor = 1,
ERDGPassFlags  AdditionalPassFlags = ERDGPassFlags::None,
float  DepthIncrement = 0.0f 
)
inlinestatic

Rect based pixel shader pass.

◆ DrawFullscreenInstancedMultiViewportPixelShader()

template<typename TShaderClass >
static void FPixelShaderUtils::DrawFullscreenInstancedMultiViewportPixelShader ( FRHICommandList RHICmdList,
const FGlobalShaderMap GlobalShaderMap,
const TShaderRef< TShaderClass > &  PixelShader,
const typename TShaderClass::FParameters &  Parameters,
TArrayView< FIntRect const >  Viewports,
FRHIBlendState BlendState = nullptr,
FRHIRasterizerState RasterizerState = nullptr,
FRHIDepthStencilState DepthStencilState = nullptr,
uint32  StencilRef = 0 
)
inlinestatic

Dispatch a full screen pixel shader to rhi command list with its parameters, covering several views at once.

◆ DrawFullscreenPixelShader()

template<typename TShaderClass >
static void FPixelShaderUtils::DrawFullscreenPixelShader ( FRHICommandList RHICmdList,
const FGlobalShaderMap GlobalShaderMap,
const TShaderRef< TShaderClass > &  PixelShader,
const typename TShaderClass::FParameters &  Parameters,
const FIntRect Viewport,
FRHIBlendState BlendState = nullptr,
FRHIRasterizerState RasterizerState = nullptr,
FRHIDepthStencilState DepthStencilState = nullptr,
uint32  StencilRef = 0 
)
inlinestatic

Dispatch a full screen pixel shader to rhi command list with its parameters.

◆ DrawFullscreenQuad()

void FPixelShaderUtils::DrawFullscreenQuad ( FRHICommandList RHICmdList,
uint32  InstanceCount = 1 
)
static

Draw a two triangle on the entire viewport.

◆ DrawFullscreenTriangle()

void FPixelShaderUtils::DrawFullscreenTriangle ( FRHICommandList RHICmdList,
uint32  InstanceCount = 1 
)
static

Draw a single triangle on the entire viewport.

◆ InitFullscreenMultiviewportPipelineState()

void FPixelShaderUtils::InitFullscreenMultiviewportPipelineState ( FRHICommandList RHICmdList,
const FGlobalShaderMap GlobalShaderMap,
const TShaderRef< FShader > &  PixelShader,
FGraphicsPipelineStateInitializer GraphicsPSOInit 
)
static

Initialize a pipeline state object initializer with almost all the basics required to do a full multi-viewport pass.

◆ InitFullscreenPipelineState()

void FPixelShaderUtils::InitFullscreenPipelineState ( FRHICommandList RHICmdList,
const FGlobalShaderMap GlobalShaderMap,
const TShaderRef< FShader > &  PixelShader,
FGraphicsPipelineStateInitializer GraphicsPSOInit 
)
static

Initialize a pipeline state object initializer with almost all the basics required to do a full viewport pass.


The documentation for this struct was generated from the following files: