Add support for GPU skinning (WIP)

This commit is contained in:
SirLynix
2022-04-18 19:10:34 +02:00
committed by Jérôme Leclercq
parent 5d8ecd11df
commit 104f60f3e7
22 changed files with 667 additions and 141 deletions

View File

@@ -30,8 +30,12 @@ namespace Nz
struct SkinningData
{
const Joint* joints;
const SkeletalMeshVertex* inputVertex;
MeshVertex* outputVertex;
SparsePtr<const Vector3f> inputPositions;
SparsePtr<const Vector4i32> inputJointIndices;
SparsePtr<const Vector4f> inputJointWeights;
SparsePtr<const Vector2f> inputUv;
SparsePtr<Vector3f> outputPositions;
SparsePtr<Vector2f> outputUv;
};
struct VertexPointers

View File

@@ -385,6 +385,8 @@ namespace Nz
Unused = -1,
Color,
JointIndices,
JointWeights,
Normal,
Position,
Tangent,

View File

@@ -33,9 +33,9 @@ namespace Nz
struct Joint
{
std::string name;
Int32 parent;
Quaternionf bindOrient;
std::string name;
Vector3f bindPos;
UInt32 flags;
UInt32 index;

View File

@@ -76,8 +76,6 @@ namespace Nz
struct VertexStruct_XYZ_Normal_UV_Tangent_Skinning : VertexStruct_XYZ_Normal_UV_Tangent
{
Int32 weightCount;
Vector4f weights;
Vector4i32 jointIndexes;
};