Import: generate materials from glTF/GLB

The Material/Shader asset system and metallic-roughness PBR rendering are implemented, but the glTF importer (engine/assets/GltfLoader.zig + engine/vendor/cgltf_wrap.c) still only extracts mesh geometry — embedded materials are ignored.

Scope

  • Extend the cgltf C wrapper to expose each primitive's material: base color factor, metallic/roughness factors, emissive factor, normal/occlusion scales, alpha mode/cutoff.
  • Extract referenced texture images (albedo, metallic-roughness, normal, emissive, occlusion); import them as image assets and assign stable GUIDs.
  • Generate a .material asset per glTF material, mapping metallic-roughness → the built-in PBR shader params, with texture bindings by GUID.
  • Preserve imported material names.
  • Assign the generated material GUID to the imported mesh's MeshRenderer.
  • Warn (don't fail) on unsupported glTF material extensions.

Acceptance

  • Importing a textured.gltf/.glb yields engine Material assets that render correctly in the viewport and built game.
  • Texture references are GUID-stable across reimport.

Honors the 'Import Pipeline'

Edited by Bruno Massa