mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 10:17:22 +01:00
Conditionally still check for weights1 even if weights0 is 0
This commit is contained in:
parent
c2085781f4
commit
676f93ce3f
1 changed files with 6 additions and 5 deletions
|
|
@ -205,17 +205,18 @@ public class MeshImporter(IEnumerable<Node> nodes, IoNotifier notifier)
|
|||
// Build a set of joints that are referenced by this mesh.
|
||||
for (var i = 0; i < joints0Accessor.Count; i++)
|
||||
{
|
||||
var joints = joints0Accessor[i];
|
||||
var weights = weights0Accessor[i];
|
||||
var joints0 = joints0Accessor[i];
|
||||
var weights0 = weights0Accessor[i];
|
||||
var joints1 = joints1Accessor?[i];
|
||||
var weights1 = weights1Accessor?[i];
|
||||
for (var index = 0; index < 4; index++)
|
||||
{
|
||||
// If a joint has absolutely no weight, we omit the bone entirely.
|
||||
if (weights[index] == 0)
|
||||
continue;
|
||||
if (weights0[index] != 0)
|
||||
{
|
||||
usedJoints.Add((ushort)joints0[index]);
|
||||
}
|
||||
|
||||
usedJoints.Add((ushort)joints[index]);
|
||||
|
||||
if (joints1 != null && weights1 != null && weights1.Value[index] != 0)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue