Browse Source

Fix typo for fourBonesByVertex skinning.

clementlandrin 5 months ago
parent
commit
3a215efb46
1 changed files with 1 additions and 1 deletions
  1. 1 1
      h3d/shader/Skin.hx

+ 1 - 1
h3d/shader/Skin.hx

@@ -53,7 +53,7 @@ class Skin extends SkinBase {
 			boneMatrixW = bonesMatrixes[int(input.indexes.w)];
 			skinWeights = vec4(input.weights, 0.0);
 			if(fourBonesByVertex) {
-				skinWeights.z = 1 - (input.weights.x + input.weights.y + input.weights.z);
+				skinWeights.w = 1 - (input.weights.x + input.weights.y + input.weights.z);
 			}
 
 			transformedPosition = applySkinPoint(relativePosition);