Skip to main content

render_scene

Function render_scene 

Source
pub fn render_scene(
    fb: &mut [u32],
    zb: &mut [f32],
    pitch_pixels: usize,
    width: u32,
    height: u32,
    pool: &mut ScratchPool,
    scene: &mut Scene,
    camera: &Camera,
    settings: &OpticastSettings,
    sky: Option<&Sky>,
) -> RenderOutcome
Expand description

matches-direct-opticast property — the test suite uses it as a sanity check that the combined-world stitch + render harness doesn’t drift vs. a raw opticast call.

Caller pre-fills fb with the desired sky colour and zb with any value (typically 0.0 matching the per-chunk renderer’s convention or f32::INFINITY for compose-friendly init); the rasterizer overwrites both per pixel that gets a hit.