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

#include <GPUSkinVertexFactory.h>

+ Inheritance diagram for FGPUBaseSkinVertexFactory:

Classes

struct  FInitializer
 
struct  FShaderDataType
 
class  FUpdateScope
 

Public Member Functions

 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 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)
 

Static Public Attributes

static const uint32 GHardwareMaxGPUSkinBones = 65536
 

Protected Member Functions

virtual void InitRHI (FRHICommandListBase &RHICmdList) override
 
virtual void ReleaseRHI () override
 
virtual void AddVertexElements (FVertexDeclarationElementList &OutElements)=0
 
- 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)
 

Protected Attributes

FShaderDataType ShaderData
 
TUniquePtr< FGPUSkinDataTypeData
 
FUniformBufferRHIRef UniformBuffer
 
TRefCountPtr< FRHIStreamSourceSlotMorphDeltaBufferSlot
 
int32 MorphDeltaStreamIndex = -1
 
- Protected Attributes inherited from FVertexFactory
FVertexStreamList Streams
 
bool bNeedsDeclaration = true
 

Additional Inherited Members

- Public Types inherited from FRenderResource
enum class  EInitPhase : uint8 { Pre , Default , MAX }
 
- Public Attributes inherited from FRenderResource
ERenderResourceState ResourceState = ERenderResourceState::Default
 
- Protected Types inherited from FVertexFactory
typedef TArray< FVertexStream, TInlineAllocator< 8 > > FVertexStreamList
 
- 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 ()
 

Detailed Description

Vertex factory with vertex stream components for GPU skinned vertices

Constructor & Destructor Documentation

◆ FGPUBaseSkinVertexFactory() [1/2]

FGPUBaseSkinVertexFactory::FGPUBaseSkinVertexFactory ( const FInitializer Initializer)

◆ FGPUBaseSkinVertexFactory() [2/2]

FGPUBaseSkinVertexFactory::FGPUBaseSkinVertexFactory ( ERHIFeatureLevel::Type  InFeatureLevel,
uint32  InNumBones,
uint32  InNumVertices,
uint32  InBaseVertexIndex,
bool  bInUsedForPassthroughVertexFactory 
)
inline

◆ ~FGPUBaseSkinVertexFactory()

virtual FGPUBaseSkinVertexFactory::~FGPUBaseSkinVertexFactory ( )
inlinevirtual

Member Function Documentation

◆ AddVertexElements()

virtual void FGPUBaseSkinVertexFactory::AddVertexElements ( FVertexDeclarationElementList OutElements)
protectedpure virtual

Add the decl elements for the streams

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

Implemented in TGPUSkinVertexFactory< BoneInfluenceType >.

◆ CopyDataTypeForLocalVertexFactory()

void FGPUBaseSkinVertexFactory::CopyDataTypeForLocalVertexFactory ( FLocalVertexFactory::FDataType OutDestData) const

◆ GetAlwaysUseDeformerForUnlimitedBoneInfluences()

bool FGPUBaseSkinVertexFactory::GetAlwaysUseDeformerForUnlimitedBoneInfluences ( EShaderPlatform  Platform)
static

Returns true if mesh LODs with Unlimited Bone Influences must always be rendered using a Mesh Deformer for the given shader platform.

◆ GetBaseVertexIndex()

uint32 FGPUBaseSkinVertexFactory::GetBaseVertexIndex ( ) const
inline

◆ GetBoneBufferSize()

uint32 FGPUBaseSkinVertexFactory::GetBoneBufferSize ( ) const
inline

◆ GetBoneInfluenceLimitForAsset()

int32 FGPUBaseSkinVertexFactory::GetBoneInfluenceLimitForAsset ( int32  AssetProvidedLimit,
const ITargetPlatform TargetPlatform = nullptr 
)
static

◆ GetBoneInfluenceType()

virtual GPUSkinBoneInfluenceType FGPUBaseSkinVertexFactory::GetBoneInfluenceType ( ) const
inlinevirtual

◆ GetBoneOffset()

uint32 FGPUBaseSkinVertexFactory::GetBoneOffset ( ) const
inline

◆ GetClothVertexFactory() [1/2]

virtual class FGPUBaseSkinAPEXClothVertexFactory * FGPUBaseSkinVertexFactory::GetClothVertexFactory ( )
inlinevirtual

Cloth vertex factory access.

Reimplemented in TGPUSkinAPEXClothVertexFactory< BoneInfluenceType >.

◆ GetClothVertexFactory() [2/2]

virtual class FGPUBaseSkinAPEXClothVertexFactory const * FGPUBaseSkinVertexFactory::GetClothVertexFactory ( ) const
inlinevirtual

◆ GetColorComponentsSRV()

virtual const FShaderResourceViewRHIRef FGPUBaseSkinVertexFactory::GetColorComponentsSRV ( ) const
inlinevirtual

◆ GetColorIndexMask()

virtual const uint32 FGPUBaseSkinVertexFactory::GetColorIndexMask ( ) const
inlinevirtual

◆ GetMaxGPUSkinBones()

int32 FGPUBaseSkinVertexFactory::GetMaxGPUSkinBones ( const class ITargetPlatform TargetPlatform = nullptr)
static

◆ GetMinimumPerPlatformMaxGPUSkinBonesValue()

int32 FGPUBaseSkinVertexFactory::GetMinimumPerPlatformMaxGPUSkinBonesValue ( )
static

◆ GetMorphVertexBuffer()

const FMorphVertexBuffer * FGPUBaseSkinVertexFactory::GetMorphVertexBuffer ( bool  bPrevious) const

◆ GetMorphVertexBufferUpdatedFrameNumber()

uint32 FGPUBaseSkinVertexFactory::GetMorphVertexBufferUpdatedFrameNumber ( ) const

◆ GetNumBoneInfluences()

virtual uint32 FGPUBaseSkinVertexFactory::GetNumBoneInfluences ( ) const
inlinevirtual

◆ GetNumBones()

uint32 FGPUBaseSkinVertexFactory::GetNumBones ( ) const
inline

◆ GetNumTexCoords()

virtual uint32 FGPUBaseSkinVertexFactory::GetNumTexCoords ( ) const
inlinevirtual

◆ GetNumVertices()

uint32 FGPUBaseSkinVertexFactory::GetNumVertices ( ) const
inline

◆ GetOverrideVertexStreams()

void FGPUBaseSkinVertexFactory::GetOverrideVertexStreams ( FVertexInputStreamArray VertexStreams) const

◆ GetPositionsSRV()

virtual const FShaderResourceViewRHIRef FGPUBaseSkinVertexFactory::GetPositionsSRV ( ) const
inlinevirtual

◆ GetPositionStreamComponent()

const FVertexStreamComponent & FGPUBaseSkinVertexFactory::GetPositionStreamComponent ( ) const
inline

◆ GetShaderData() [1/2]

FShaderDataType & FGPUBaseSkinVertexFactory::GetShaderData ( )
inline

accessor

◆ GetShaderData() [2/2]

const FShaderDataType & FGPUBaseSkinVertexFactory::GetShaderData ( ) const
inline

◆ GetTangentsSRV()

virtual const FShaderResourceViewRHIRef FGPUBaseSkinVertexFactory::GetTangentsSRV ( ) const
inlinevirtual

◆ GetTangentStreamComponent()

const FVertexStreamComponent & FGPUBaseSkinVertexFactory::GetTangentStreamComponent ( int  Index) const
inline

◆ GetTextureCoordinatesSRV()

virtual const FShaderResourceViewRHIRef FGPUBaseSkinVertexFactory::GetTextureCoordinatesSRV ( ) const
inlinevirtual

◆ GetTriangleSortingPositionSRV()

virtual FShaderResourceViewRHIRef FGPUBaseSkinVertexFactory::GetTriangleSortingPositionSRV ( ) const
inlineoverridevirtual

Reimplemented from FVertexFactory.

◆ GetUniformBuffer()

FRHIUniformBuffer * FGPUBaseSkinVertexFactory::GetUniformBuffer ( ) const
inline

◆ GetUnlimitedBoneInfluences()

bool FGPUBaseSkinVertexFactory::GetUnlimitedBoneInfluences ( const ITargetPlatform TargetPlatform = nullptr)
static

◆ InitRHI()

void FGPUBaseSkinVertexFactory::InitRHI ( FRHICommandListBase RHICmdList)
overrideprotectedvirtual

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

Reimplemented from FRenderResource.

Reimplemented in TGPUSkinVertexFactory< BoneInfluenceType >, and TGPUSkinAPEXClothVertexFactory< BoneInfluenceType >.

◆ IsMorphTarget()

virtual bool FGPUBaseSkinVertexFactory::IsMorphTarget ( ) const
inlinevirtual

◆ IsReadyForStaticMeshCaching()

bool FGPUBaseSkinVertexFactory::IsReadyForStaticMeshCaching ( ) const
inline

◆ IsUniformBufferValid()

bool FGPUBaseSkinVertexFactory::IsUniformBufferValid ( ) const
inline

◆ MarkUniformBufferDirty()

void FGPUBaseSkinVertexFactory::MarkUniformBufferDirty ( )
inline

◆ ReleaseRHI()

void FGPUBaseSkinVertexFactory::ReleaseRHI ( )
overrideprotectedvirtual

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 FVertexFactory.

Reimplemented in TGPUSkinVertexFactory< BoneInfluenceType >, and TGPUSkinAPEXClothVertexFactory< BoneInfluenceType >.

◆ SetData() [1/2]

void FGPUBaseSkinVertexFactory::SetData ( const FGPUSkinDataType InData)

An implementation of the interface used by TSynchronizedResource to update the resource with new data from the game thread.

Parameters
InData- new stream component data

◆ SetData() [2/2]

void FGPUBaseSkinVertexFactory::SetData ( FRHICommandListBase RHICmdList,
const FGPUSkinDataType InData 
)
virtual

◆ UpdateMorphState()

void FGPUBaseSkinVertexFactory::UpdateMorphState ( FRHICommandListBase RHICmdList,
bool  bUseMorphTarget 
)

Morph vertex factory functions

◆ UpdateUniformBuffer()

void FGPUBaseSkinVertexFactory::UpdateUniformBuffer ( FRHICommandListBase RHICmdList)

◆ Use16BitBoneIndex()

virtual bool FGPUBaseSkinVertexFactory::Use16BitBoneIndex ( ) const
inlinevirtual

◆ UseUnlimitedBoneInfluences()

bool FGPUBaseSkinVertexFactory::UseUnlimitedBoneInfluences ( uint32  MaxBoneInfluences,
const ITargetPlatform TargetPlatform = nullptr 
)
static

Member Data Documentation

◆ Data

TUniquePtr<FGPUSkinDataType> FGPUBaseSkinVertexFactory::Data
protected

stream component data bound to this vertex factory

◆ GHardwareMaxGPUSkinBones

const uint32 FGPUBaseSkinVertexFactory::GHardwareMaxGPUSkinBones = 65536
static

◆ MorphDeltaBufferSlot

TRefCountPtr<FRHIStreamSourceSlot> FGPUBaseSkinVertexFactory::MorphDeltaBufferSlot
protected

◆ MorphDeltaStreamIndex

int32 FGPUBaseSkinVertexFactory::MorphDeltaStreamIndex = -1
protected

◆ ShaderData

FShaderDataType FGPUBaseSkinVertexFactory::ShaderData
protected

dynamic data need for setting the shader

◆ UniformBuffer

FUniformBufferRHIRef FGPUBaseSkinVertexFactory::UniformBuffer
protected

Shader bindings are stored here in the uniform buffer.


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