Skip to content

Commit e9694b7

Browse files
committed
Fix exporting models with UInt16 positions
1 parent fbdf44d commit e9694b7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

LSLib/Granny/Model/Vertex.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,8 @@ public VertexDescriptor ConstructDescriptor(MemberDefinition memberDefn, StructD
426426
{
427427
desc.PositionType = PositionType.Float3;
428428
}
429-
else if (member.Type == MemberType.BinormalInt16 && member.ArraySize == 4)
429+
// Game incorrectly uses UInt16 instead of BinormalInt16 sometimes
430+
else if ((member.Type == MemberType.BinormalInt16 || member.Type == MemberType.UInt16) && member.ArraySize == 4)
430431
{
431432
desc.PositionType = PositionType.Word4;
432433
}
@@ -478,7 +479,8 @@ public VertexDescriptor ConstructDescriptor(MemberDefinition memberDefn, StructD
478479
break;
479480

480481
case "QTangent":
481-
if (member.Type == MemberType.BinormalInt16 && member.ArraySize == 4)
482+
// Game incorrectly uses UInt16 instead of BinormalInt16 sometimes
483+
if ((member.Type == MemberType.BinormalInt16 || member.Type == MemberType.UInt16) && member.ArraySize == 4)
482484
{
483485
desc.NormalType = NormalType.QTangent;
484486
desc.TangentType = NormalType.QTangent;

0 commit comments

Comments
 (0)