소스 검색

* MeshLoader will no longer generate NaN weights for vertices with no bone-weight assignments. Instead it will generate zero which will cause those vertices to remain in the bind pose.

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9727 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
Sha..rd 13 년 전
부모
커밋
2bfd91ef2e
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      engine/src/ogre/com/jme3/scene/plugins/ogre/MeshLoader.java

+ 1 - 1
engine/src/ogre/com/jme3/scene/plugins/ogre/MeshLoader.java

@@ -344,7 +344,7 @@ public class MeshLoader extends DefaultHandler implements AssetLoader {
             if (sum != 1f) {
                 weightsFloatData.position(weightsFloatData.position() - 4);
                 // compute new vals based on sum
-                float sumToB = 1f / sum;
+                float sumToB = sum == 0 ? 0 : 1f / sum;
                 weightsFloatData.put(w0 * sumToB);
                 weightsFloatData.put(w1 * sumToB);
                 weightsFloatData.put(w2 * sumToB);