#hdr #assets #validation #renderer-agnostic #ktx2 #exr #bake #typescript #cubemap #lookup-tables

ibl_core

Renderer-agnostic Rust core for baking, reading, validating IBL assets, and exporting KTX2

3 unstable releases

0.2.1 Apr 10, 2026
0.2.0 Apr 10, 2026
0.1.0 Apr 8, 2026

#5 in #ktx2


Used in ibl_cli

MIT license

140KB
3.5K SLoC

ibl_core

ibl_core is the renderer-agnostic Rust core for the ibl-baker workspace. It owns HDR/EXR input handling, bake pipeline execution, output encoding, and validation logic.

Scope

The crate is responsible for:

  • environment source loading for latlong HDR/EXR/LDR inputs and 6-face cubemap sets
  • latlong-to-cubemap conversion and cubemap-to-cubemap resampling
  • specular prefilter generation
  • irradiance generation
  • BRDF LUT generation
  • mip chain generation
  • .ibla container read/write and validation
  • KTX2 cubemap export (BC6H + zstd, via the ktx2_writer crate)

It stays independent from renderer-specific runtime upload paths.

Relationship To Other Packages

  • crates/ibl_cli exposes the public command-line workflow on top of this crate. See crates/ibl_cli/README.md for CLI options and output format details.
  • crates/ktx2_writer is the write-only KTX2 serializer used internally for KTX2 output. See crates/ktx2_writer/README.md for its narrow serialization scope.
  • packages/ibla-loader is the parser-only TypeScript reader for .ibla files.
  • packages/ktx2-loader is the narrow TypeScript reader for ibl-baker KTX2 cubemap files.

The .ibla binary format is defined in docs/format-spec.md.

Dependencies

~59MB
~563K SLoC