harmony
harmony copied to clipboard
Gltf mesh loading duplicates materials.
Currently when loading in GLTF mesh both the mesh import code and the material manager duplicate materials per primitive. We can do better than that and share materials between primitives that have the same material on load.
Thoughts on how to fix. Currently we use a random UUID as the asset key when loading in a material from memory or in this case from the Gltf data. Instead we should perhaps use the material name in the gltf file.