fix(assets): decode normalized glTF skin weights#654
Open
Changdw wants to merge 3 commits into
Open
Conversation
Contributor
Author
|
Fixes glTF skin weight corruption caused by ignoring Problem:
Changes:
|
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
修复 glTF importer 未正确处理
accessor.normalized导致的 skin weights 导入问题。问题场景:
WEIGHTS_0/WEIGHTS_1为UNSIGNED_BYTE + normalized: true。reduceJointInfluences()中对Uint8Array做归一化,浮点结果被截断,导致权重损坏,蒙皮网格出现尖刺。修复内容:
normalized: true的WEIGHTS_*accessor 在进入 joint influence reduction 前解码为Float32Array。normalized: false或未声明时不覆盖PPGeometry原有的 normalized 推断逻辑。