1
0
mirror of synced 2024-12-01 10:37:25 +01:00

GFBMDL : Order attributes by type when added.

This commit is contained in:
KillzXGaming 2019-12-14 15:48:10 -05:00
parent 0a10f27787
commit 49cabdd508

View File

@ -571,6 +571,16 @@ namespace FirstPlugin
}); });
} }
if (setting.HasTangents)
{
attributes.Add(new MeshAttribute()
{
VertexType = (uint)VertexType.Tangents,
BufferFormat = (uint)setting.TangentsFormat,
ElementCount = 4,
});
}
if (setting.HasTexCoord1) { if (setting.HasTexCoord1) {
attributes.Add(new MeshAttribute() attributes.Add(new MeshAttribute()
{ {
@ -619,22 +629,7 @@ namespace FirstPlugin
ElementCount = 4, ElementCount = 4,
}); });
} }
if (setting.HasBitangents) {
attributes.Add(new MeshAttribute()
{
VertexType = (uint)VertexType.Bitangent,
BufferFormat = (uint)setting.BitangentnFormat,
ElementCount = 4,
});
}
if (setting.HasWeights) {
attributes.Add(new MeshAttribute()
{
VertexType = (uint)VertexType.BoneWeight,
BufferFormat = (uint)setting.BoneWeightFormat,
ElementCount = 4,
});
}
if (setting.HasBoneIndices) { if (setting.HasBoneIndices) {
attributes.Add(new MeshAttribute() attributes.Add(new MeshAttribute()
{ {
@ -643,11 +638,23 @@ namespace FirstPlugin
ElementCount = 4, ElementCount = 4,
}); });
} }
if (setting.HasTangents) {
if (setting.HasWeights)
{
attributes.Add(new MeshAttribute() attributes.Add(new MeshAttribute()
{ {
VertexType = (uint)VertexType.Tangents, VertexType = (uint)VertexType.BoneWeight,
BufferFormat = (uint)setting.TangentsFormat, BufferFormat = (uint)setting.BoneWeightFormat,
ElementCount = 4,
});
}
if (setting.HasBitangents)
{
attributes.Add(new MeshAttribute()
{
VertexType = (uint)VertexType.Bitangent,
BufferFormat = (uint)setting.BitangentnFormat,
ElementCount = 4, ElementCount = 4,
}); });
} }