Skip to main content

Module material_compile

Module material_compile 

Source
Expand description

Material-section compilation and readback helpers for versioned .10d assets. Cold-path material/submesh compilation over the canonical .10d geometry compiler.

Enums§

MaterialCompileError

Functions§

compile_10d_pbr
Seal a PBR mesh: MAT4 materials plus optional UV01 and SurfaceReading. Texture payloads stay encoded in HMC/deps; bind them with pack_pbr_set.
compile_mesh_to_10d_with_materials
Convenience compile for a static mesh with material/submesh data and legacy defaults for all other optional streams.
compile_mesh_with_materials
Compile geometry and its optional streams, then attach validated material and submesh data. The output is a sealed .10d container; old static assets continue to use their implicit MaterialRecord::legacy_default() when no MAT1 section is present.
decode_10d_materials_into
Read the material records and submesh ranges from a compiled mesh container.
scope_material_bindings
Scope source-local imported material IDs to a stable asset URI and remap primitive ranges. This is cold-path construction; deterministic IDs keep separately compiled assets isolated.