未验证 提交 5fb22e40 编写于 作者: M Mr.doob 提交者: GitHub

Merge pull request #16611 from zeux/dev

GLTFLoader: Fix U8/U16 skinning weights
......@@ -2613,7 +2613,13 @@ THREE.GLTFLoader = ( function () {
? new THREE.SkinnedMesh( geometry, material )
: new THREE.Mesh( geometry, material );
if ( mesh.isSkinnedMesh === true ) mesh.normalizeSkinWeights(); // #15319
if ( mesh.isSkinnedMesh === true && !mesh.geometry.attributes.skinWeight.normalized ) {
// we normalize floating point skin weight array to fix malformed assets (see #15319)
// it's important to skip this for non-float32 data since normalizeSkinWeights assumes non-normalized inputs
mesh.normalizeSkinWeights();
}
if ( primitive.mode === WEBGL_CONSTANTS.TRIANGLE_STRIP ) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册