Parent: #126
Problem
tools/bloom-cook is currently texture-focused. A high-end renderer needs deterministic offline processing for meshes, meshlets/LODs, textures, materials, animation, environments, and world dependencies. Runtime parsing of source glTF plus uncompressed/general-purpose texture upload cannot support large scenes, virtualized geometry, or predictable platform memory.
Outcome
A versioned, deterministic, content-addressed cooked asset database with platform/quality variants and an incremental CLI.
Build graph
- Inputs are source assets plus importer/cooker version, platform profile, quality profile, and relevant settings.
- Each output has a stable content hash and explicit dependency hashes.
- Rebuild only invalidated nodes; produce identical bytes for identical inputs/settings.
- Store provenance, source license/path, warnings, and diagnostic names.
- Write atomically; interrupted cooks may not leave valid-looking partial artifacts.
Required processors
Textures
- Preserve color-space/normal/data semantics.
- Generate coverage-preserving alpha mips and normal-aware mips.
- Emit platform formats: desktop BC family (including BC7/BC6H as appropriate), mobile ASTC/ETC fallback, and WebGPU-compatible path; use KTX2/Basis where it is the right transport rather than as a blanket answer.
- Record dimensions, mip offsets, format, alpha mode, and streaming page layout.
Meshes
- Validate/normalize coordinate, index, tangent, skin, and morph data.
- Generate conventional LODs and bounds.
- Provide meshlet/cluster hierarchy/page output needed by the virtual-geometry issue.
- Preserve material boundaries and stable submesh/material IDs.
Materials/animations/environments
- Cook the complete supported glTF material extension data.
- Pack animation clips/skeletons with validated joint mappings and compression metadata.
- Prefilter environment lighting and record color/exposure conventions.
Package/index
- Versioned manifest maps logical asset IDs to variant chunks, dependencies, offsets/sizes, and hashes.
- Support loose development output and packed shipping archives without changing logical IDs.
- Runtime rejects incompatible versions with an actionable recook message.
CLI/API
Provide commands equivalent to:
bloom-cook build <manifest> --platform macos --quality high
bloom-cook inspect <artifact-or-package>
bloom-cook verify <package>
bloom-cook clean --unreferenced
Exact syntax may differ, but output must be scriptable and diagnostics identify source asset/material/node.
Acceptance criteria
Likely files
tools/bloom-cook/
- shared asset-format crate/module (do not duplicate struct layout between cooker/runtime)
native/shared/src/textures.rs, models*.rs, animation/environment loaders
- package scripts and release workflow
Non-goals
- Runtime streaming policy; covered by the async streaming issue.
- An editor asset browser.
- Removing source-asset loading in development mode.
Dependencies
Can start independently. Coordinate formats with #131, #134, and #137 before freezing v1.
Parent: #126
Problem
tools/bloom-cookis currently texture-focused. A high-end renderer needs deterministic offline processing for meshes, meshlets/LODs, textures, materials, animation, environments, and world dependencies. Runtime parsing of source glTF plus uncompressed/general-purpose texture upload cannot support large scenes, virtualized geometry, or predictable platform memory.Outcome
A versioned, deterministic, content-addressed cooked asset database with platform/quality variants and an incremental CLI.
Build graph
Required processors
Textures
Meshes
Materials/animations/environments
Package/index
CLI/API
Provide commands equivalent to:
Exact syntax may differ, but output must be scriptable and diagnostics identify source asset/material/node.
Acceptance criteria
Likely files
tools/bloom-cook/native/shared/src/textures.rs,models*.rs, animation/environment loadersNon-goals
Dependencies
Can start independently. Coordinate formats with #131, #134, and #137 before freezing v1.