All experiments

Software rendering

Image Rasterizer

Turn triangles into pixels and inspect the depth, coverage, and texture calculations behind the image.

JavaScript · Canvas 2D · Web Workers

View source on GitHub

Try it

All computation stays in your browser.

A smooth terracotta torus above a sage ground plane, rendered by the software rasterizer.

Opening Image Rasterizer

From the experiment

Captured from the working tool.

1,282 triangles, interpolated surface normals, and depth testing. Canvas 2D displays the computed pixels.
Perspective-correct texture mapping. Toggle it in the tool to see how affine interpolation distorts the checker.

Source and documentation

The repository includes the implementation, reproducible examples, and tests.

Explore Image Rasterizer on GitHub