Just start it and enjoy! (Tri-filler Benchmark) The Osmium Renderer. - Fastest rasterizer currently on Scratch for this benchmark. (~2x faster than SGL V3.0.7.) https://turbowarp.org/1383155506 - For the best experience. Optionally, enable HQ-Pen and 60-250 FPS. If you end up using the algorithm detailed below, please copy-paste the credits or just reference this project or me. Notes: Made with ScratchASM + JS, not in the regular editor. This is a benchmark, but you CAN use it to rasterize and render actual scenes.
This uses 'Direct MSB-Order Packed Z-Buffering': Direct MSB-Order Packed Z-Buffering, developed by Priospire, is a Z-buffer optimization designed for Scratch/TurboWarp. It packs a 24-bit depth value into the most-significant bits of a number and the triangle ID into the least-significant bits. Because this packing preserves depth order, two packed values can be compared directly. The closer fragment naturally has the smaller value. This removes the need to unpack, divide, or separately compare depth inside the pixel loop. In its fully recurrent form, the packed value is stepped across a scanline using a single addition, reducing the core Z-buffer loop to roughly 5 Scratch blocks. This makes it especially suited to extremely high-throughput software rasterization in Scratch.