* 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
This commit is contained in:
parent
a2ff0ba179
commit
2bfd91ef2e
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user