#include <SkinningUbo.hpp>
|
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.
|
|
◆ Configuration
◆ 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] | data | The skinning data. |
[in] | transform | The pre-skinning transform. |
[in] | writer | The shader writer. |
[in] | skinningId | The node's skinning ID. |
[in] | boneIds0 | The bones IDs (0..3). |
[in] | boneIds1 | The bones IDs (4..7). |
[in] | boneWeights0 | The bones weights (0..3). |
[in] | boneWeights1 | The bones weights (4..7). |
- Returns
- The resulting matrix.
Referenced by computeTransform().
◆ 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] | data | The skinning data. |
[in] | surface | The processed surface |
[in] | writer | The shader writer. |
[in] | instanceIndex | The instance index. |
[in] | boneIds0 | The bones IDs (0..3). |
[in] | boneIds1 | The bones IDs (4..7). |
[in] | boneWeights0 | The bones weights (0..3). |
[in] | boneWeights1 | The bones weights (4..7). |
- Returns
- The resulting matrix.
References computeTransform().
◆ 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] | writer | The shader writer. |
[in] | transformsBinding | The descriptor set binding point for the transforms buffer. |
[in] | transformsSet | The descriptor set index for the transforms buffer. |
[in] | hasSkin | true to enable skinning. |
- Returns
- The skinning data.
◆ BufferSkinning
Name of the skinning animation frame variable buffer.
The documentation for this class was generated from the following file: