Skip to main content

build_probe_payload

Function build_probe_payload 

Source
pub fn build_probe_payload<S: RowScheduler>(
    scheduler: &S,
    faces: &[Vec<f32>; 6],
    face_size: u32,
    irradiance_face: u32,
    prefilter_samples: u32,
    prefilter_clamp: f32,
) -> Vec<u8> 
Expand description

Convert six captured cube faces (each face_size*face_size RGBA f32, row major, in the FACE_BASIS order) into the serialised ENVM payload the environment sampler consumes: a cosine-convolved irradiance cube + a GGX prefilter mip chain. Reuses the exact build-time convolutions (including the firefly clamp), so a scene-captured probe and an imported HDR produce byte-compatible payloads that flow through the same upload_environment_map. scheduler runs each convolution’s independent output rows; the engine hands in its job pool.