bones_vertex.glsl 1.4 KB

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