Skip to content

Commit

Permalink
Merge pull request #1593 from colincornaby/fix-metal-animation-blending
Browse files Browse the repository at this point in the history
Fix for Metal skinning blend matrix being multiplied in wrong order
  • Loading branch information
colincornaby authored Jun 4, 2024
2 parents f85fd87 + aa0d1c2 commit 23f874e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ vertex ColorInOut pipelineVertexShader(Vertex in [[stage_in]],

float4 position = float4(in.position, 1.f) * uniforms.localToWorldMatrix;
if (temp_hasOnlyWeight1) {
const float4 position2 = blendMatrix1 * float4(in.position, 1.f);
const float4 position2 = float4(in.position, 1.f) * blendMatrix1;
position = (in.weight1 * position) + ((1.f - in.weight1) * position2);
}

Expand Down

0 comments on commit 23f874e

Please sign in to comment.