Skip to content

Commit 8ce2fc7

Browse files
[Rendering] Fix Skinning Matrix multiplication;
1 parent 2636f76 commit 8ce2fc7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Tools/ShaderIncludes/Staple.slang

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,9 @@ public float4x4 StapleGetBoneMatrix(int index)
9595

9696
public float4x4 StapleGetSkinningMatrix(float4x4 world, float4 indices, float4 weights)
9797
{
98-
return mul(weights.x * StapleGetBoneMatrix(int(indices.x)) +
98+
return mul(world, weights.x * StapleGetBoneMatrix(int(indices.x)) +
9999
weights.y * StapleGetBoneMatrix(int(indices.y)) +
100100
weights.z * StapleGetBoneMatrix(int(indices.z)) +
101-
weights.w * StapleGetBoneMatrix(int(indices.w)), world);
101+
weights.w * StapleGetBoneMatrix(int(indices.w)));
102102
}
103103
#endif

0 commit comments

Comments
 (0)