renderer
Software rasterizer in Rust, drawing every pixel into a plain buffer
Why
Wanted to understand what a GPU actually does when it draws a triangle, so I wrote one on the CPU, based on tsoding's olive.c. No graphics crates, just a Vec<u32> of pixels and Xlib to put it on screen.
How it works
Triangles are filled with edge functions over the bounding box, which also gives barycentric weights for colour gradients. Shared edges follow the top-left rule so they're only drawn once. There's alpha blending, Bresenham lines, circles, and a flat shaded cube with back-face culling and perspective. Frames can be rendered headless to PPM, which is how the tests and CI check output.
Next
Next is a depth buffer, then textures, text and a WASM build so the demos run in the browser.