UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
TGPUSkinVertexFactory< BoneInfluenceType > Class Template Reference

#include <GPUSkinVertexFactory.h>

+ Inheritance diagram for TGPUSkinVertexFactory< BoneInfluenceType >:

Public Member Functions

 TGPUSkinVertexFactory (const FInitializer &Initializer)
 
virtual void InitRHI (FRHICommandListBase &RHICmdList) override
 
virtual void ReleaseRHI () override
 
- Public Member Functions inherited from FGPUBaseSkinVertexFactory
 FGPUBaseSkinVertexFactory (const FInitializer &Initializer)
 
 FGPUBaseSkinVertexFactory (ERHIFeatureLevel::Type InFeatureLevel, uint32 InNumBones, uint32 InNumVertices, uint32 InBaseVertexIndex, bool bInUsedForPassthroughVertexFactory)
 
virtual ~FGPUBaseSkinVertexFactory ()
 
FShaderDataTypeGetShaderData ()
 
const FShaderDataTypeGetShaderData () const
 
void SetData (const FGPUSkinDataType *InData)
 
virtual void SetData (FRHICommandListBase &RHICmdList, const FGPUSkinDataType *InData)
 
uint32 GetBoneBufferSize () const
 
uint32 GetNumBones () const
 
uint32 GetBoneOffset () const
 
uint32 GetNumVertices () const
 
uint32 GetBaseVertexIndex () const
 
void UpdateMorphState (FRHICommandListBase &RHICmdList, bool bUseMorphTarget)
 
const class FMorphVertexBufferGetMorphVertexBuffer (bool bPrevious) const
 
uint32 GetMorphVertexBufferUpdatedFrameNumber () const
 
virtual class FGPUBaseSkinAPEXClothVertexFactoryGetClothVertexFactory ()
 
virtual class FGPUBaseSkinAPEXClothVertexFactory const * GetClothVertexFactory () const
 
virtual GPUSkinBoneInfluenceType GetBoneInfluenceType () const
 
virtual uint32 GetNumBoneInfluences () const
 
virtual bool Use16BitBoneIndex () const
 
virtual const FShaderResourceViewRHIRef GetPositionsSRV () const
 
virtual const FShaderResourceViewRHIRef GetTangentsSRV () const
 
virtual const FShaderResourceViewRHIRef GetTextureCoordinatesSRV () const
 
virtual const FShaderResourceViewRHIRef GetColorComponentsSRV () const
 
virtual uint32 GetNumTexCoords () const
 
virtual const uint32 GetColorIndexMask () const
 
virtual bool IsMorphTarget () const
 
virtual FShaderResourceViewRHIRef GetTriangleSortingPositionSRV () const override
 
void UpdateUniformBuffer (FRHICommandListBase &RHICmdList)
 
FRHIUniformBufferGetUniformBuffer () const
 
const FVertexStreamComponentGetPositionStreamComponent () const
 
const FVertexStreamComponentGetTangentStreamComponent (int Index) const
 
void CopyDataTypeForLocalVertexFactory (FLocalVertexFactory::FDataType &OutDestData) const
 
void GetOverrideVertexStreams (FVertexInputStreamArray &VertexStreams) const
 
bool IsReadyForStaticMeshCaching () const
 
void MarkUniformBufferDirty ()
 
bool IsUniformBufferValid () 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
 
virtual bool SupportsPositionOnlyStream () const
 
virtual bool SupportsPositionAndNormalOnlyStream () 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 TGPUSkinVertexFactory(ERHIFeatureLevel::Type InFeatureLevel, uint32 InNumBones, uint32 InNumVertices, uint32 InBaseVertexIndex, bool bInUsedForPassthroughVertexFactory) PRAGMA_DISABLE_DEPRECATION_WARNINGS bool ShouldCompilePermutation (const FVertexFactoryShaderPermutationParameters &Parameters)
 
static void GetPSOPrecacheVertexFetchElements (EVertexInputStreamType VertexInputStreamType, FVertexDeclarationElementList &Elements)
 
static void GetVertexElements (ERHIFeatureLevel::Type FeatureLevel, EVertexInputStreamType InputStreamType, FGPUSkinDataType &GPUSkinData, FVertexDeclarationElementList &Elements)
 
- Static Public Member Functions inherited from FGPUBaseSkinVertexFactory
static ENGINE_API int32 GetMinimumPerPlatformMaxGPUSkinBonesValue ()
 
static ENGINE_API int32 GetMaxGPUSkinBones (const class ITargetPlatform *TargetPlatform=nullptr)
 
static ENGINE_API bool UseUnlimitedBoneInfluences (uint32 MaxBoneInfluences, const ITargetPlatform *TargetPlatform=nullptr)
 
static ENGINE_API bool GetUnlimitedBoneInfluences (const ITargetPlatform *TargetPlatform=nullptr)
 
static ENGINE_API int32 GetBoneInfluenceLimitForAsset (int32 AssetProvidedLimit, const ITargetPlatform *TargetPlatform=nullptr)
 
static ENGINE_API bool GetAlwaysUseDeformerForUnlimitedBoneInfluences (EShaderPlatform Platform)
 
- 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)
 

Protected Member Functions

virtual void AddVertexElements (FVertexDeclarationElementList &OutElements) override
 
- 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

static void GetVertexElements (ERHIFeatureLevel::Type FeatureLevel, EVertexInputStreamType InputStreamType, FGPUSkinDataType &GPUSkinData, FVertexDeclarationElementList &Elements, FVertexStreamList &InOutStreams, int32 &OutMorphDeltaStreamIndex)
 
- 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 ()
 

Additional Inherited Members

- Public Types inherited from FRenderResource
enum class  EInitPhase : uint8 { Pre , Default , MAX }
 
- Public Attributes inherited from FRenderResource
ERenderResourceState ResourceState = ERenderResourceState::Default
 
- Static Public Attributes inherited from FGPUBaseSkinVertexFactory
static const uint32 GHardwareMaxGPUSkinBones = 65536
 
- Protected Types inherited from FVertexFactory
typedef TArray< FVertexStream, TInlineAllocator< 8 > > FVertexStreamList
 
- Protected Attributes inherited from FGPUBaseSkinVertexFactory
FShaderDataType ShaderData
 
TUniquePtr< FGPUSkinDataTypeData
 
FUniformBufferRHIRef UniformBuffer
 
TRefCountPtr< FRHIStreamSourceSlotMorphDeltaBufferSlot
 
int32 MorphDeltaStreamIndex = -1
 
- Protected Attributes inherited from FVertexFactory
FVertexStreamList Streams
 
bool bNeedsDeclaration = true
 

Detailed Description

template<GPUSkinBoneInfluenceType BoneInfluenceType>
class TGPUSkinVertexFactory< BoneInfluenceType >

Vertex factory with vertex stream components for GPU skinned vertices

Constructor & Destructor Documentation

◆ TGPUSkinVertexFactory()

template<GPUSkinBoneInfluenceType BoneInfluenceType>
TGPUSkinVertexFactory< BoneInfluenceType >::TGPUSkinVertexFactory ( const FInitializer Initializer)
inline

Member Function Documentation

◆ AddVertexElements()

template<GPUSkinBoneInfluenceType BoneInfluenceType>
void TGPUSkinVertexFactory< BoneInfluenceType >::AddVertexElements ( FVertexDeclarationElementList OutElements)
overrideprotectedvirtual

Add the decl elements for the streams

Parameters
InData- type with stream components
OutElements- vertex decl list to modify

Add the vertex declaration elements for the streams.

Parameters
InData- Type with stream components.
OutElements- Vertex declaration list to modify.

Implements FGPUBaseSkinVertexFactory.

◆ GetPSOPrecacheVertexFetchElements()

template<GPUSkinBoneInfluenceType BoneInfluenceType>
void TGPUSkinVertexFactory< BoneInfluenceType >::GetPSOPrecacheVertexFetchElements ( EVertexInputStreamType  VertexInputStreamType,
FVertexDeclarationElementList Elements 
)
static

TGPUSkinVertexFactory does not support manual vertex fetch yet so worst case element set is returned to make sure the PSO can be compiled

◆ GetVertexElements() [1/2]

template<GPUSkinBoneInfluenceType BoneInfluenceType>
void TGPUSkinVertexFactory< BoneInfluenceType >::GetVertexElements ( ERHIFeatureLevel::Type  FeatureLevel,
EVertexInputStreamType  InputStreamType,
FGPUSkinDataType GPUSkinData,
FVertexDeclarationElementList Elements 
)
static

◆ GetVertexElements() [2/2]

template<GPUSkinBoneInfluenceType BoneInfluenceType>
void TGPUSkinVertexFactory< BoneInfluenceType >::GetVertexElements ( ERHIFeatureLevel::Type  FeatureLevel,
EVertexInputStreamType  InputStreamType,
FGPUSkinDataType GPUSkinData,
FVertexDeclarationElementList Elements,
FVertexStreamList InOutStreams,
int32 OutMorphDeltaStreamIndex 
)
staticprotected

◆ InitRHI()

template<GPUSkinBoneInfluenceType BoneInfluenceType>
void TGPUSkinVertexFactory< BoneInfluenceType >::InitRHI ( FRHICommandListBase RHICmdList)
overridevirtual

Creates declarations for each of the vertex stream components and initializes the device resource

Reimplemented from FGPUBaseSkinVertexFactory.

Reimplemented in TGPUSkinAPEXClothVertexFactory< BoneInfluenceType >.

◆ ReleaseRHI()

template<GPUSkinBoneInfluenceType BoneInfluenceType>
void TGPUSkinVertexFactory< BoneInfluenceType >::ReleaseRHI ( )
overridevirtual

Releases the RHI resources used by this resource. Called when leaving the state where both the resource and the RHI have been initialized. This is only called by the rendering thread.

Reimplemented from FGPUBaseSkinVertexFactory.

Reimplemented in TGPUSkinAPEXClothVertexFactory< BoneInfluenceType >.

◆ ShouldCompilePermutation()

template<GPUSkinBoneInfluenceType BoneInfluenceType>
bool TGPUSkinVertexFactory< BoneInfluenceType >::ShouldCompilePermutation ( const FVertexFactoryShaderPermutationParameters Parameters)
static

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