Castor3D 0.16.0
Multiplatform 3D engine
Public Types | Static Public Member Functions | Static Public Attributes | List of all members
castor3d::SkinningUbo Class Reference

#include <SkinningUbo.hpp>

Collaboration diagram for castor3d::SkinningUbo:
Collaboration graph
[legend]

Public Types

using Configuration = SkinningTransformsConfiguration
 

Static Public Member Functions

static C3D_API shader::SkinningData declare (sdw::ShaderWriter &writer, uint32_t transformsBinding, uint32_t transformsSet, bool hasSkin)
 Declares the variables needed to compute skinning in vertex shader.
 
static C3D_API sdw::Mat4 computeTransform (shader::SkinningData const &data, sdw::Mat4 const &transform, sdw::ShaderWriter &writer, sdw::UInt const &skinningId, sdw::UVec4 const &boneIds0, sdw::UVec4 const &boneIds1, sdw::Vec4 const &boneWeights0, sdw::Vec4 const &boneWeights1)
 Computes skinning transformation in vertex shader.
 
template<ast::var::Flag FlagT>
static sdw::Mat4 computeTransform (shader::SkinningData const &data, shader::MeshVertexT< FlagT > const &surface, sdw::ShaderWriter &writer, sdw::Int const &instanceIndex, sdw::UVec4 const &boneIds0, sdw::UVec4 const &boneIds1, sdw::Vec4 const &boneWeights0, sdw::Vec4 const &boneWeights1)
 Computes skinning transformation in vertex shader.
 

Static Public Attributes

static C3D_API castor::MbString const BufferSkinning
 

Member Typedef Documentation

◆ Configuration

Member Function Documentation

◆ computeTransform() [1/2]

static C3D_API sdw::Mat4 castor3d::SkinningUbo::computeTransform ( shader::SkinningData const & data,
sdw::Mat4 const & transform,
sdw::ShaderWriter & writer,
sdw::UInt const & skinningId,
sdw::UVec4 const & boneIds0,
sdw::UVec4 const & boneIds1,
sdw::Vec4 const & boneWeights0,
sdw::Vec4 const & boneWeights1 )
static

Computes skinning transformation in vertex shader.

Parameters
[in]dataThe skinning data.
[in]transformThe pre-skinning transform.
[in]writerThe shader writer.
[in]skinningIdThe node's skinning ID.
[in]boneIds0The bones IDs (0..3).
[in]boneIds1The bones IDs (4..7).
[in]boneWeights0The bones weights (0..3).
[in]boneWeights1The bones weights (4..7).
Returns
The resulting matrix.

Referenced by computeTransform().

Here is the caller graph for this function:

◆ computeTransform() [2/2]

template<ast::var::Flag FlagT>
static sdw::Mat4 castor3d::SkinningUbo::computeTransform ( shader::SkinningData const & data,
shader::MeshVertexT< FlagT > const & surface,
sdw::ShaderWriter & writer,
sdw::Int const & instanceIndex,
sdw::UVec4 const & boneIds0,
sdw::UVec4 const & boneIds1,
sdw::Vec4 const & boneWeights0,
sdw::Vec4 const & boneWeights1 )
inlinestatic

Computes skinning transformation in vertex shader.

Parameters
[in]dataThe skinning data.
[in]surfaceThe processed surface
[in]writerThe shader writer.
[in]instanceIndexThe instance index.
[in]boneIds0The bones IDs (0..3).
[in]boneIds1The bones IDs (4..7).
[in]boneWeights0The bones weights (0..3).
[in]boneWeights1The bones weights (4..7).
Returns
The resulting matrix.

References computeTransform().

Here is the call graph for this function:

◆ declare()

static C3D_API shader::SkinningData castor3d::SkinningUbo::declare ( sdw::ShaderWriter & writer,
uint32_t transformsBinding,
uint32_t transformsSet,
bool hasSkin )
static

Declares the variables needed to compute skinning in vertex shader.

Parameters
[in]writerThe shader writer.
[in]transformsBindingThe descriptor set binding point for the transforms buffer.
[in]transformsSetThe descriptor set index for the transforms buffer.
[in]hasSkintrue to enable skinning.
Returns
The skinning data.

Member Data Documentation

◆ BufferSkinning

C3D_API castor::MbString const castor3d::SkinningUbo::BufferSkinning
static

Name of the skinning animation frame variable buffer.


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