bones_vertex.glsl 1.2 KB

12345678910111213141516171819202122232425262728
  1. #if BONE_INFLUENCERS > 0
  2. mat4 influence = mBones[int(matricesIndices[0])] * matricesWeights[0];
  3. #if BONE_INFLUENCERS > 1
  4. influence += mBones[int(matricesIndices[1])] * matricesWeights[1];
  5. #if BONE_INFLUENCERS > 2
  6. influence += mBones[int(matricesIndices[2])] * matricesWeights[2];
  7. #if BONE_INFLUENCERS > 3
  8. influence += mBones[int(matricesIndices[3])] * matricesWeights[3];
  9. // #if BONE_INFLUENCERS > 4
  10. // influence += mBones[int(matricesIndicesExtra[0])] * matricesWeightsExtra[0];
  11. // #if BONE_INFLUENCERS > 5
  12. // influence += mBones[int(matricesIndicesExtra[1])] * matricesWeightsExtra[1];
  13. // #if BONE_INFLUENCERS > 6
  14. // influence += mBones[int(matricesIndicesExtra[2])] * matricesWeightsExtra[2];
  15. // #if BONE_INFLUENCERS > 7
  16. // influence += mBones[int(matricesIndicesExtra[3])] * matricesWeightsExtra[3];
  17. // #endif
  18. // #endif
  19. // #endif
  20. // #endif
  21. #endif
  22. #endif
  23. #endif
  24. finalWorld = finalWorld * influence;
  25. #endif