Animation WIP merge #321
|
@ -71,5 +71,5 @@ void main()
|
|||
boneMatrix += BoneMatrices.data[aBoneIndices[3]] * aBoneWeights[3];
|
||||
|
||||
// clip space for rendering
|
||||
gl_Position = cameraData.vpMat * worldTransform * vec4 (aVertexPos, 1.0f);
|
||||
gl_Position = cameraData.vpMat * worldTransform * boneMatrix * vec4 (aVertexPos, 1.0f);
|
||||
}
|
Binary file not shown.
|
@ -86,7 +86,7 @@ namespace SHADE
|
|||
currClip = newClip;
|
||||
secsPerTick = 1.0f / currClip->GetTicksPerSecond();
|
||||
|
||||
if (!rig)
|
||||
if (rig)
|
||||
{
|
||||
updatePoseWithClip(0.0f);
|
||||
}
|
||||
|
|
|
@ -185,7 +185,9 @@ namespace SHADE
|
|||
}
|
||||
else
|
||||
{
|
||||
const auto OG_SIZE = vertBoneWeightStorage.size();
|
||||
vertBoneWeightStorage.resize(vertBoneWeightStorage.size() + addJob.VertexCount);
|
||||
std::fill_n(vertBoneWeightStorage.begin() + OG_SIZE, addJob.VertexCount, SHVec4(1.0f, 0.0f, 0.0f, 0.0f));
|
||||
}
|
||||
indexStorage.insert
|
||||
(
|
||||
|
|
|
@ -211,7 +211,9 @@ namespace SHADE
|
|||
assetData.VertexTangents.data(),
|
||||
assetData.VertexNormals.data(),
|
||||
assetData.Indices.size(),
|
||||
assetData.Indices.data()
|
||||
assetData.Indices.data(),
|
||||
assetData.VertexBoneIndices.empty() ? nullptr : assetData.VertexBoneIndices.data(),
|
||||
assetData.VertexBoneWeights.empty() ? nullptr : assetData.VertexBoneWeights.data()
|
||||
);
|
||||
}
|
||||
// Textures
|
||||
|
|
Loading…
Reference in New Issue