Skip to main content

Module source

Module source 

Source
Expand description

Equirectangular sources for the IBL bake: the in-memory image type, the resampler that turns one into the six cube faces the convolutions read, the built-in sky generator, and the full source-to-payload bake. Decoding a source file into an HdrImage is the cook crate’s job; nothing here touches I/O.

Structs§

HdrImage
An equirectangular radiance image: linear RGB rows, top-down.

Functions§

bake_payload
Convolve an equirectangular source into the serialised IBL payload: header, irradiance cube, prefilter mips. One bake serves the cook pipeline, the editor’s hot-reload preview, and a runtime bake, so no path can diverge from the built asset; rows spreads each convolution’s independent output rows over whatever the caller has (super::schedule::Serial without a pool).
equirect_to_cube
Resample an equirectangular HDR image into six square cube faces of face_size pixels. Output is RGBA32F (alpha = 1.0) row-major top-down, matching the Metal / Vulkan / DX cube convention.
generate_sky_equirect
Synthetic equirectangular HDR for the generator: "sky" source. Same palette as the 2D generate_sky texture generator, extended to a full sphere: top half is zenith → mid → horizon, bottom half is solid horizon (no ground term yet, IBL only). Slightly super-1.0 values toward the sun direction give the prefilter convolution something HDR-like to chew on.