Skip to main content

Module bake

Module bake 

Source
Expand description

Baking: the pure computation that turns an asset’s args into the payload the runtime plays – payload formats, their deserialise family, and the bake kernels that need no source file (IBL convolution, the built-in font’s SDF atlas, mesh payload packing). Everything here is no_std: schedulers and caches are the caller’s concern. The asset COMPILE pipeline (importers, encoders, image/glTF decoders, shader compilation, the world expansion + check front-half, and blob writing) lives in the concinnity-cook crate and calls down into this module.

Modules§

color_lut
Compiles a ColorLut component’s args into the binary payload the renderer uploads as a 3D colour-grading LUT. The runtime samples this LUT in the composite (post-process) pass with the display-referred sRGB colour as the texture coordinate, blending the graded result by PostProcessConfig’s lut_strength.
environment_map
Compiles an EnvironmentMap component’s args into a payload bundling two precomputed IBL cubemaps:
font
The compiled font payload: a power-of-two RGBA atlas of signed-distance-field glyphs plus their metrics, which GraphicsSystem uploads and draws from.
mesh
Mesh payload baking: derive tangents from the UV gradient, build the optional LOD alternate index lists, and serialise the packed mesh payload. The shared tail every mesh generator’s output runs through before it can be played, whether the caller is the cook pipeline or a runtime bake.
payload
Baking an asset’s payload from its typed value.
texture
Texture payload format helpers shared between the runtime and the build crate. The file -> pixels decoders (PNG / JPEG / DDS / TGA / KTX2 / glb-embedded images) live in concinnity_cook::compile::texture; this module keeps only what a running engine needs with no image-decode dependencies: turning a compiled payload back into a TextureImage (deserialise) and the box-filter downscale_rgba the build pipeline uses to cap oversized source maps.