Moved the material slot list from ModelLodAsset to ModelAsset, so all the slots live in one main list. This removes data duplication between LODs and cleans up the code a bit.
I had to update the ModelLod class to take in both the ModelLodAsset and ModelAsset for initialization so it can fetch the slots for each mesh. Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
This commit is contained in:
@@ -639,8 +639,9 @@ namespace AZ
|
||||
|
||||
Aabb localAabb = lod.m_subMeshProperties[i].m_aabb;
|
||||
modelLodCreator.SetMeshAabb(AZStd::move(localAabb));
|
||||
|
||||
modelLodCreator.SetMeshMaterialSlot(lod.m_subMeshProperties[i].m_materialSlot);
|
||||
|
||||
modelCreator.AddMaterialSlot(lod.m_subMeshProperties[i].m_materialSlot);
|
||||
modelLodCreator.SetMeshMaterialSlot(lod.m_subMeshProperties[i].m_materialSlot.m_stableId);
|
||||
|
||||
modelLodCreator.EndMesh();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user