UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FGPUSkinPassthroughVertexFactory Class Reference

#include <GPUSkinVertexFactory.h>

+ Inheritance diagram for FGPUSkinPassthroughVertexFactory:

Classes

struct  FAddVertexAttributeDesc
 

Public Types

enum  EShaderResource {
  Position , PreviousPosition , Tangent , Color ,
  TexCoord , NumShaderResources
}
 
enum  EVertexAttribute { VertexPosition , VertexTangent , VertexColor , NumAttributes }
 
enum class  EVertexAttributeFlags : uint8 { None = 0 , Position = 1 << EVertexAttribute::VertexPosition , Tangent = 1 << EVertexAttribute::VertexTangent , Color = 1 << EVertexAttribute::VertexColor }
 
- Public Types inherited from FRenderResource
enum class  EInitPhase : uint8 { Pre , Default , MAX }
 

Public Member Functions

 FGPUSkinPassthroughVertexFactory (ERHIFeatureLevel::Type InFeatureLevel, EVertexAttributeFlags InVertexAttributeMask)
 
 FGPUSkinPassthroughVertexFactory (ERHIFeatureLevel::Type InFeatureLevel, EVertexAttributeFlags InVertexAttributeMask, uint32 InNumVertices)
 
void ResetVertexAttributes (FRHICommandListBase &RHICmdList)
 
void SetVertexAttributes (FRHICommandListBase &RHICmdList, FGPUBaseSkinVertexFactory const *InSourceVertexFactory, FAddVertexAttributeDesc const &InDesc)
 
bool SupportsPositionOnlyStream () const override
 
bool SupportsPositionAndNormalOnlyStream () const override
 
void GetOverrideVertexStreams (FVertexInputStreamArray &VertexStreams) const
 
EPixelFormat GetTangentFormat () const
 
uint32 GetNumVertices () const
 
- Public Member Functions inherited from FLocalVertexFactory
ENGINE_API FLocalVertexFactory (ERHIFeatureLevel::Type InFeatureLevel, const char *InDebugName)
 
virtual ENGINE_API ~FLocalVertexFactory ()
 
ENGINE_API void SetData (FRHICommandListBase &RHICmdList, const FDataType &InData)
 
ENGINE_API void SetData (const FDataType &InData)
 
ENGINE_API void Copy (const FLocalVertexFactory &Other)
 
void SetColorOverrideStream (FRHICommandList &RHICmdList, const FVertexBuffer *ColorVertexBuffer) const
 
void GetColorOverrideStream (const FVertexBuffer *ColorVertexBuffer, FVertexInputStreamArray &VertexStreams) const
 
virtual FShaderResourceViewRHIRef GetTriangleSortingPositionSRV () const override
 
FRHIShaderResourceViewGetPositionsSRV () const
 
FRHIShaderResourceViewGetPreSkinPositionSRV () const
 
FRHIShaderResourceViewGetTangentsSRV () const
 
FRHIShaderResourceViewGetTextureCoordinatesSRV () const
 
FRHIShaderResourceViewGetColorComponentsSRV () const
 
const uint32 GetColorIndexMask () const
 
const int GetLightMapCoordinateIndex () const
 
const int GetNumTexcoords () const
 
FRHIUniformBufferGetUniformBuffer () const
 
- Public Member Functions inherited from FVertexFactory
 FVertexFactory (ERHIFeatureLevel::Type InFeatureLevel)
 
virtual RENDERCORE_API ~FVertexFactory ()
 
virtual FVertexFactoryTypeGetType () const
 
RENDERCORE_API void GetStreams (ERHIFeatureLevel::Type InFeatureLevel, EVertexInputStreamType VertexStreamType, FVertexInputStreamArray &OutVertexStreams) const
 
RENDERCORE_API void OffsetInstanceStreams (uint32 InstanceOffset, EVertexInputStreamType VertexStreamType, FVertexInputStreamArray &VertexStreams) const
 
FVertexDeclarationRHIRefGetDeclaration ()
 
void SetDeclaration (FVertexDeclarationRHIRef &NewDeclaration)
 
const FVertexDeclarationRHIRefGetDeclaration (EVertexInputStreamType InputStreamType) const
 
bool SupportsNullPixelShader () const
 
bool SupportsTriangleSorting () const
 
virtual bool RendersPrimitivesAsCameraFacingSprites () const
 
bool NeedsDeclaration () const
 
bool SupportsManualVertexFetch (const FStaticFeatureLevel InFeatureLevel) const
 
int32 GetPrimitiveIdStreamIndex (const FStaticFeatureLevel InFeatureLevel, EVertexInputStreamType InputStreamType) const
 
bool SupportsGPUScene (const FStaticFeatureLevel InFeatureLevel) const
 
- Public Member Functions inherited from FRenderResource
RENDERCORE_API FRenderResource ()
 
RENDERCORE_API FRenderResource (ERHIFeatureLevel::Type InFeatureLevel)
 
RENDERCORE_API FRenderResource (const FRenderResource &)
 
RENDERCORE_API FRenderResource (FRenderResource &&)
 
RENDERCORE_API FRenderResourceoperator= (const FRenderResource &Other)
 
RENDERCORE_API FRenderResourceoperator= (FRenderResource &&Other)
 
virtual RENDERCORE_API ~FRenderResource ()
 
virtual RENDERCORE_API void InitResource (FRHICommandListBase &RHICmdList)
 
virtual RENDERCORE_API void ReleaseResource ()
 
RENDERCORE_API void UpdateRHI (FRHICommandListBase &RHICmdList)
 
virtual FString GetFriendlyName () const
 
bool IsInitialized () const
 
int32 GetListIndex () const
 
EInitPhase GetInitPhase () const
 
void SetOwnerName (FName InOwnerName)
 
FName GetOwnerName () const
 
void SetResourceName (FName InResourceName)
 
FName GetResourceName () const
 

Static Public Member Functions

static ENGINE_API void GetVertexElements (ERHIFeatureLevel::Type FeatureLevel, EVertexInputStreamType InputStreamType, bool bSupportsManualVertexFetch, FDataType &Data, FVertexDeclarationElementList &Elements)
 
- Static Public Member Functions inherited from FLocalVertexFactory
static ENGINE_API bool ShouldCompilePermutation (const FVertexFactoryShaderPermutationParameters &Parameters)
 
static ENGINE_API void ModifyCompilationEnvironment (const FVertexFactoryShaderPermutationParameters &Parameters, FShaderCompilerEnvironment &OutEnvironment)
 
static ENGINE_API void ValidateCompiledResult (const FVertexFactoryType *Type, EShaderPlatform Platform, const FShaderParameterMap &ParameterMap, TArray< FString > &OutErrors)
 
static ENGINE_API void GetPSOPrecacheVertexFetchElements (EVertexInputStreamType VertexInputStreamType, FVertexDeclarationElementList &Elements)
 
static ENGINE_API void GetVertexElements (ERHIFeatureLevel::Type FeatureLevel, EVertexInputStreamType InputStreamType, bool bSupportsManualVertexFetch, FDataType &Data, FVertexDeclarationElementList &Elements)
 
- Static Public Member Functions inherited from FVertexFactory
static void ModifyCompilationEnvironment (const FVertexFactoryShaderPermutationParameters &Parameters, FShaderCompilerEnvironment &OutEnvironment)
 
static void ValidateCompiledResult (const FVertexFactoryType *Type, EShaderPlatform Platform, const FShaderParameterMap &ParameterMap, TArray< FString > &OutErrors)
 
static void GetPSOPrecacheVertexFetchElements (EVertexInputStreamType VertexInputStreamType, FVertexDeclarationElementList &Elements)
 
- Static Public Member Functions inherited from FRenderResource
static RENDERCORE_API void ReleaseRHIForAllResources ()
 
static RENDERCORE_API void InitPreRHIResources ()
 
static RENDERCORE_API void ChangeFeatureLevel (ERHIFeatureLevel::Type NewFeatureLevel)
 
static RENDERCORE_API FName SetScopeName (FName Name)
 

Public Attributes

TUniformBufferRef< FGPUSkinPassThroughFactoryLooseParametersLooseParametersUniformBuffer
 
- Public Attributes inherited from FRenderResource
ERenderResourceState ResourceState = ERenderResourceState::Default
 

Additional Inherited Members

- Protected Types inherited from FVertexFactory
typedef TArray< FVertexStream, TInlineAllocator< 8 > > FVertexStreamList
 
- Protected Member Functions inherited from FLocalVertexFactory
const FDataTypeGetData () const
 
- Protected Member Functions inherited from FVertexFactory
void SetPrimitiveIdStreamIndex (const FStaticFeatureLevel InFeatureLevel, EVertexInputStreamType InputStreamType, int32 StreamIndex)
 
RENDERCORE_API bool AddPrimitiveIdStreamElement (EVertexInputStreamType InputStreamType, FVertexDeclarationElementList &Elements, uint8 AttributeIndex, uint8 AttributeIndex_Mobile)
 
FVertexElement AccessStreamComponent (const FVertexStreamComponent &Component, uint8 AttributeIndex)
 
RENDERCORE_API FVertexElement AccessStreamComponent (const FVertexStreamComponent &Component, uint8 AttributeIndex, EVertexInputStreamType InputStreamType)
 
RENDERCORE_API void InitDeclaration (const FVertexDeclarationElementList &Elements, EVertexInputStreamType StreamType=EVertexInputStreamType::Default)
 
- Protected Member Functions inherited from FRenderResource
void SetFeatureLevel (const FStaticFeatureLevel InFeatureLevel)
 
const FStaticFeatureLevel GetFeatureLevel () const
 
bool HasValidFeatureLevel () const
 
template<typename T >
FBufferRHIRef CreateRHIBuffer (FRHICommandListBase &RHICmdList, T &InOutResourceObject, uint32 ResourceCount, EBufferUsageFlags InBufferUsageFlags, const TCHAR *InDebugName)
 
void SetInitPhase (EInitPhase InInitPhase)
 
- Static Protected Member Functions inherited from FLocalVertexFactory
static ENGINE_API void GetVertexElements (ERHIFeatureLevel::Type FeatureLevel, EVertexInputStreamType InputStreamType, bool bSupportsManualVertexFetch, FDataType &Data, FVertexDeclarationElementList &Elements, FVertexStreamList &InOutStreams, int32 &OutColorStreamIndex)
 
- Static Protected Member Functions inherited from FVertexFactory
template<typename VertexStreamListType >
static FVertexElement AccessStreamComponent (const FVertexStreamComponent &Component, uint8 AttributeIndex, VertexStreamListType &InOutStreams)
 
- Static Protected Member Functions inherited from FRenderResource
static RENDERCORE_API FRHICommandListBaseGetImmediateCommandList ()
 
- Protected Attributes inherited from FLocalVertexFactory
FDataType Data
 
TUniformBufferRef< FLocalVertexFactoryUniformShaderParametersUniformBuffer
 
int32 ColorStreamIndex
 
bool bGPUSkinPassThrough = false
 
struct FLocalVertexFactory::FDebugName DebugName
 
- Protected Attributes inherited from FVertexFactory
FVertexStreamList Streams
 
bool bNeedsDeclaration = true
 

Detailed Description

Vertex factory with vertex stream components for GPU-skinned streams. This enables Passthrough mode where vertices have been pre-skinned. Individual vertex attributes can be flagged so that they can be overridden by externally owned buffers.

Member Enumeration Documentation

◆ EShaderResource

SRVs that we can provide.

Enumerator
Position 
PreviousPosition 
Tangent 
Color 
TexCoord 
NumShaderResources 

◆ EVertexAttribute

Vertex attributes that we can override.

Enumerator
VertexPosition 
VertexTangent 
VertexColor 
NumAttributes 

◆ EVertexAttributeFlags

Enumerator
None 
Position 
Tangent 
Color 

Constructor & Destructor Documentation

◆ FGPUSkinPassthroughVertexFactory() [1/2]

FGPUSkinPassthroughVertexFactory::FGPUSkinPassthroughVertexFactory ( ERHIFeatureLevel::Type  InFeatureLevel,
EVertexAttributeFlags  InVertexAttributeMask 
)
inline

◆ FGPUSkinPassthroughVertexFactory() [2/2]

FGPUSkinPassthroughVertexFactory::FGPUSkinPassthroughVertexFactory ( ERHIFeatureLevel::Type  InFeatureLevel,
EVertexAttributeFlags  InVertexAttributeMask,
uint32  InNumVertices 
)

Member Function Documentation

◆ GetNumVertices()

uint32 FGPUSkinPassthroughVertexFactory::GetNumVertices ( ) const
inline

◆ GetOverrideVertexStreams()

void FGPUSkinPassthroughVertexFactory::GetOverrideVertexStreams ( FVertexInputStreamArray VertexStreams) const

◆ GetTangentFormat()

EPixelFormat FGPUSkinPassthroughVertexFactory::GetTangentFormat ( ) const
inline

◆ GetVertexElements()

void FGPUSkinPassthroughVertexFactory::GetVertexElements ( ERHIFeatureLevel::Type  FeatureLevel,
EVertexInputStreamType  InputStreamType,
bool  bSupportsManualVertexFetch,
FLocalVertexFactory::FDataType Data,
FVertexDeclarationElementList Elements 
)
static

◆ ResetVertexAttributes()

void FGPUSkinPassthroughVertexFactory::ResetVertexAttributes ( FRHICommandListBase RHICmdList)

Reset all added vertex attributes and SRVs. This doesn't reset the vertex factory itself. Call SetData() to do that.

◆ SetVertexAttributes()

void FGPUSkinPassthroughVertexFactory::SetVertexAttributes ( FRHICommandListBase RHICmdList,
FGPUBaseSkinVertexFactory const *  InSourceVertexFactory,
FAddVertexAttributeDesc const &  InDesc 
)

◆ SupportsPositionAndNormalOnlyStream()

bool FGPUSkinPassthroughVertexFactory::SupportsPositionAndNormalOnlyStream ( ) const
inlineoverridevirtual

Indicates whether the vertex factory supports a position-and-normal-only stream.

Reimplemented from FVertexFactory.

◆ SupportsPositionOnlyStream()

bool FGPUSkinPassthroughVertexFactory::SupportsPositionOnlyStream ( ) const
inlineoverridevirtual

Indicates whether the vertex factory supports a position-only stream.

Reimplemented from FVertexFactory.

Member Data Documentation

◆ LooseParametersUniformBuffer

TUniformBufferRef<FGPUSkinPassThroughFactoryLooseParameters> FGPUSkinPassthroughVertexFactory::LooseParametersUniformBuffer

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