Skip to main content

Module ibl_cubemap

Module ibl_cubemap 

Source
Expand description

Zero-Heap Procedural IBL Cubemap Generator & GGX Specular Prefilter (Pure Rust).

Structs§

IblCubemapGenerator
GPU-resident cubemap IBL generator and prefiltered environment probe state.
IblCubemapParams
Uniform parameters for IblCubemapGenerator (64 bytes).

Constants§

IBL_BRDF_LUT_SIZE
IBL_CUBEMAP_CONVOLVE_WGSL
WGSL compute shader for 6-face procedural sky cubemap generation, diffuse irradiance convolution, 5-mip GGX importance-sampled specular prefiltering, and split-sum BRDF integration.
IBL_ENV_CUBEMAP_SIZE
IBL_IRRADIANCE_CUBEMAP_SIZE
IBL_SPECULAR_CUBEMAP_SIZE
IBL_SPECULAR_MIP_COUNT

Functions§

cubemap_face_uv_to_direction
Maps a cubemap face index (0..=5 for +X, -X, +Y, -Y, +Z, -Z) and normalized face coordinates uv in [-1.0, 1.0]^2 to a unit world-space direction vector.
eval_procedural_sky_radiance_zero_heap
Evaluates the procedural Rayleigh + Henyey-Greenstein Mie sky radiance in direction dir on the CPU with zero heap allocations (HotZeroHeap).
integrate_split_sum_brdf_zero_heap
Evaluates the split-sum BRDF integration $(s, b)$ at (n_dot_v, roughness) using Hammersley GGX importance sampling with zero heap allocations (HotZeroHeap).