Skip to main content

render_sky_fill

Function render_sky_fill 

Source
pub fn render_sky_fill(
    fb: &mut [u32],
    zb: &[f32],
    pitch_pixels: usize,
    width: u32,
    height: u32,
    cam: &CameraState,
    settings: &OpticastSettings,
    sky: &Sky,
)
Expand description

Fill the panorama Sky into every background pixel — one whose z-buffer entry is still +∞ (no grid/terrain hit). The per-grid DDA only samples the sky inside each grid’s screen rect (and only its sky-owning grid); pixels outside any grid — most of a sprite/effect-only view, or the margins around a small world grid — would otherwise keep the caller’s flat clear colour. This paints the real panorama there while leaving terrain (finite z) and composited translucent pixels untouched. The z-buffer is not modified. cam/settings are the same per-frame projection the renderer used.