UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FMeshPassProcessor Class Referenceabstract

#include <MeshPassProcessor.h>

+ Inheritance diagram for FMeshPassProcessor:

Classes

struct  FMeshDrawingPolicyOverrideSettings
 

Public Member Functions

 FMeshPassProcessor (const FScene *InScene, ERHIFeatureLevel::Type InFeatureLevel, const FSceneView *InViewIfDynamicMeshCommand, FMeshPassDrawListContext *InDrawListContext)
 
RENDERER_API FMeshPassProcessor (EMeshPass::Type InMeshPassType, const FScene *InScene, ERHIFeatureLevel::Type InFeatureLevel, const FSceneView *InViewIfDynamicMeshCommand, FMeshPassDrawListContext *InDrawListContext)
 
RENDERER_API FMeshPassProcessor (const TCHAR *InMeshPassName, const FScene *InScene, ERHIFeatureLevel::Type InFeatureLevel, const FSceneView *InViewIfDynamicMeshCommand, FMeshPassDrawListContext *InDrawListContext)
 
virtual ~FMeshPassProcessor ()
 
void SetDrawListContext (FMeshPassDrawListContext *InDrawListContext)
 
virtual void AddMeshBatch (const FMeshBatch &RESTRICT MeshBatch, uint64 BatchElementMask, const FPrimitiveSceneProxy *RESTRICT PrimitiveSceneProxy, int32 StaticMeshId=-1)=0
 
virtual void CollectPSOInitializers (const FSceneTexturesConfig &SceneTexturesConfig, const FMaterial &Material, const FPSOPrecacheVertexFactoryData &VertexFactoryData, const FPSOPrecacheParams &PreCacheParams, TArray< FPSOPrecacheData > &PSOInitializers) override
 
template<typename PassShadersType , typename ShaderElementDataType >
void BuildMeshDrawCommands (const FMeshBatch &RESTRICT MeshBatch, uint64 BatchElementMask, const FPrimitiveSceneProxy *RESTRICT PrimitiveSceneProxy, const FMaterialRenderProxy &RESTRICT MaterialRenderProxy, const FMaterial &RESTRICT MaterialResource, const FMeshPassProcessorRenderState &RESTRICT DrawRenderState, const PassShadersType &PassShaders, ERasterizerFillMode MeshFillMode, ERasterizerCullMode MeshCullMode, FMeshDrawCommandSortKey SortKey, EMeshPassFeatures MeshPassFeatures, const ShaderElementDataType &ShaderElementData)
 
template<typename PassShadersType >
void AddGraphicsPipelineStateInitializer (const FPSOPrecacheVertexFactoryData &VertexFactoryData, const FMaterial &RESTRICT MaterialResource, const FMeshPassProcessorRenderState &RESTRICT DrawRenderState, const FGraphicsPipelineRenderTargetsInfo &RESTRICT RenderTargetsInfo, const PassShadersType &PassShaders, ERasterizerFillMode MeshFillMode, ERasterizerCullMode MeshCullMode, EPrimitiveType PrimitiveType, EMeshPassFeatures MeshPassFeatures, bool bRequired, TArray< FPSOPrecacheData > &PSOInitializers)
 
- Public Member Functions inherited from IPSOCollector
 IPSOCollector (int32 InPSOCollectorIndex)
 
virtual ~IPSOCollector ()
 
void CollectPSOInitializers (const FSceneTexturesConfig &SceneTexturesConfig, const FMaterial &Material, const FVertexFactoryType *VertexFactoryType, const FPSOPrecacheParams &PreCacheParams, TArray< FPSOPrecacheData > &PSOInitializers)
 

Static Public Member Functions

static FORCEINLINE_DEBUGGABLE ERasterizerCullMode InverseCullMode (ERasterizerCullMode CullMode)
 
static RENDERER_API FMeshDrawingPolicyOverrideSettings ComputeMeshOverrideSettings (const FPSOPrecacheParams &PrecachePSOParams)
 
static RENDERER_API FMeshDrawingPolicyOverrideSettings ComputeMeshOverrideSettings (const FMeshBatch &Mesh)
 
static RENDERER_API ERasterizerFillMode ComputeMeshFillMode (const FMaterial &InMaterialResource, const FMeshDrawingPolicyOverrideSettings &InOverrideSettings)
 
static RENDERER_API ERasterizerCullMode ComputeMeshCullMode (const FMaterial &InMaterialResource, const FMeshDrawingPolicyOverrideSettings &InOverrideSettings)
 
template<typename PassShadersType >
static void AddGraphicsPipelineStateInitializer (const FPSOPrecacheVertexFactoryData &VertexFactoryData, const FMaterial &RESTRICT MaterialResource, const FMeshPassProcessorRenderState &RESTRICT DrawRenderState, const FGraphicsPipelineRenderTargetsInfo &RESTRICT RenderTargetsInfo, const PassShadersType &PassShaders, ERasterizerFillMode MeshFillMode, ERasterizerCullMode MeshCullMode, EPrimitiveType PrimitiveType, EMeshPassFeatures MeshPassFeatures, ESubpassHint SubpassHint, uint8 SubpassIndex, bool bRequired, int32 PSOCollectorIndex, TArray< FPSOPrecacheData > &PSOInitializers)
 

Public Attributes

EMeshPass::Type MeshPassType
 
const FScene *RESTRICT Scene
 
ERHIFeatureLevel::Type FeatureLevel
 
const FSceneViewViewIfDynamicMeshCommand
 
FMeshPassDrawListContextDrawListContext
 
- Public Attributes inherited from IPSOCollector
int32 PSOCollectorIndex = INDEX_NONE
 

Protected Member Functions

RENDERER_API FMeshDrawCommandPrimitiveIdInfo GetDrawCommandPrimitiveId (const FPrimitiveSceneInfo *RESTRICT PrimitiveSceneInfo, const FMeshBatchElement &BatchElement) const
 
RENDERER_API bool ShouldSkipMeshDrawCommand (const FMeshBatch &RESTRICT MeshBatch, const FPrimitiveSceneProxy *RESTRICT PrimitiveSceneProxy) const
 
RENDERER_API bool PipelineVariableRateShadingEnabled () const
 
RENDERER_API bool HardwareVariableRateShadingSupportedByScene () const
 

Detailed Description

Base class of mesh processors, whose job is to transform FMeshBatch draw descriptions received from scene proxy implementations into FMeshDrawCommands ready for the RHI command list

Constructor & Destructor Documentation

◆ FMeshPassProcessor() [1/3]

FMeshPassProcessor::FMeshPassProcessor ( const FScene InScene,
ERHIFeatureLevel::Type  InFeatureLevel,
const FSceneView InViewIfDynamicMeshCommand,
FMeshPassDrawListContext InDrawListContext 
)
inline

◆ FMeshPassProcessor() [2/3]

FMeshPassProcessor::FMeshPassProcessor ( EMeshPass::Type  InMeshPassType,
const FScene InScene,
ERHIFeatureLevel::Type  InFeatureLevel,
const FSceneView InViewIfDynamicMeshCommand,
FMeshPassDrawListContext InDrawListContext 
)

◆ FMeshPassProcessor() [3/3]

FMeshPassProcessor::FMeshPassProcessor ( const TCHAR InMeshPassName,
const FScene InScene,
ERHIFeatureLevel::Type  InFeatureLevel,
const FSceneView InViewIfDynamicMeshCommand,
FMeshPassDrawListContext InDrawListContext 
)

◆ ~FMeshPassProcessor()

virtual FMeshPassProcessor::~FMeshPassProcessor ( )
inlinevirtual

Member Function Documentation

◆ AddGraphicsPipelineStateInitializer() [1/2]

void FMeshPassProcessor::AddGraphicsPipelineStateInitializer ( const FPSOPrecacheVertexFactoryData VertexFactoryData,
const FMaterial &RESTRICT  MaterialResource,
const FMeshPassProcessorRenderState &RESTRICT  DrawRenderState,
const FGraphicsPipelineRenderTargetsInfo &RESTRICT  RenderTargetsInfo,
const PassShadersType PassShaders,
ERasterizerFillMode  MeshFillMode,
ERasterizerCullMode  MeshCullMode,
EPrimitiveType  PrimitiveType,
EMeshPassFeatures  MeshPassFeatures,
bool  bRequired,
TArray< FPSOPrecacheData > &  PSOInitializers 
)

◆ AddGraphicsPipelineStateInitializer() [2/2]

void FMeshPassProcessor::AddGraphicsPipelineStateInitializer ( const FPSOPrecacheVertexFactoryData VertexFactoryData,
const FMaterial &RESTRICT  MaterialResource,
const FMeshPassProcessorRenderState &RESTRICT  DrawRenderState,
const FGraphicsPipelineRenderTargetsInfo &RESTRICT  RenderTargetsInfo,
const PassShadersType PassShaders,
ERasterizerFillMode  MeshFillMode,
ERasterizerCullMode  MeshCullMode,
EPrimitiveType  PrimitiveType,
EMeshPassFeatures  MeshPassFeatures,
ESubpassHint  SubpassHint,
uint8  SubpassIndex,
bool  bRequired,
int32  PSOCollectorIndex,
TArray< FPSOPrecacheData > &  PSOInitializers 
)
static

◆ AddMeshBatch()

◆ BuildMeshDrawCommands()

void FMeshPassProcessor::BuildMeshDrawCommands ( const FMeshBatch &RESTRICT  MeshBatch,
uint64  BatchElementMask,
const FPrimitiveSceneProxy *RESTRICT  PrimitiveSceneProxy,
const FMaterialRenderProxy &RESTRICT  MaterialRenderProxy,
const FMaterial &RESTRICT  MaterialResource,
const FMeshPassProcessorRenderState &RESTRICT  DrawRenderState,
const PassShadersType PassShaders,
ERasterizerFillMode  MeshFillMode,
ERasterizerCullMode  MeshCullMode,
FMeshDrawCommandSortKey  SortKey,
EMeshPassFeatures  MeshPassFeatures,
const ShaderElementDataType ShaderElementData 
)

◆ CollectPSOInitializers()

◆ ComputeMeshCullMode()

ERasterizerCullMode FMeshPassProcessor::ComputeMeshCullMode ( const FMaterial InMaterialResource,
const FMeshDrawingPolicyOverrideSettings InOverrideSettings 
)
static

◆ ComputeMeshFillMode()

ERasterizerFillMode FMeshPassProcessor::ComputeMeshFillMode ( const FMaterial InMaterialResource,
const FMeshDrawingPolicyOverrideSettings InOverrideSettings 
)
static

◆ ComputeMeshOverrideSettings() [1/2]

FMeshPassProcessor::FMeshDrawingPolicyOverrideSettings FMeshPassProcessor::ComputeMeshOverrideSettings ( const FMeshBatch Mesh)
static

◆ ComputeMeshOverrideSettings() [2/2]

FMeshPassProcessor::FMeshDrawingPolicyOverrideSettings FMeshPassProcessor::ComputeMeshOverrideSettings ( const FPSOPrecacheParams PrecachePSOParams)
static

◆ GetDrawCommandPrimitiveId()

FMeshDrawCommandPrimitiveIdInfo FMeshPassProcessor::GetDrawCommandPrimitiveId ( const FPrimitiveSceneInfo *RESTRICT  PrimitiveSceneInfo,
const FMeshBatchElement BatchElement 
) const
protected

◆ HardwareVariableRateShadingSupportedByScene()

bool FMeshPassProcessor::HardwareVariableRateShadingSupportedByScene ( ) const
protected

◆ InverseCullMode()

static FORCEINLINE_DEBUGGABLE ERasterizerCullMode FMeshPassProcessor::InverseCullMode ( ERasterizerCullMode  CullMode)
inlinestatic

◆ PipelineVariableRateShadingEnabled()

bool FMeshPassProcessor::PipelineVariableRateShadingEnabled ( ) const
protected

◆ SetDrawListContext()

void FMeshPassProcessor::SetDrawListContext ( FMeshPassDrawListContext InDrawListContext)
inline

◆ ShouldSkipMeshDrawCommand()

bool FMeshPassProcessor::ShouldSkipMeshDrawCommand ( const FMeshBatch &RESTRICT  MeshBatch,
const FPrimitiveSceneProxy *RESTRICT  PrimitiveSceneProxy 
) const
protected

Member Data Documentation

◆ DrawListContext

FMeshPassDrawListContext* FMeshPassProcessor::DrawListContext

◆ FeatureLevel

ERHIFeatureLevel::Type FMeshPassProcessor::FeatureLevel

◆ MeshPassType

EMeshPass::Type FMeshPassProcessor::MeshPassType

◆ Scene

const FScene* RESTRICT FMeshPassProcessor::Scene

◆ ViewIfDynamicMeshCommand

const FSceneView* FMeshPassProcessor::ViewIfDynamicMeshCommand

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