mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 18:27:24 +01:00
Conditionally still check for weights1 even if weights0 is 0
This commit is contained in:
parent
9de6b3a905
commit
9c6498e028
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