3D Software Rasterizer¶
A simple 3D software rasterizer built from scratch in Lua using LÖVE2D. No GPU acceleration—just pure CPU rendering to understand how 3D graphics really work.

Characteristics¶
This rasterizer implements fundamental 3D rendering algorithms from scratch:
- Triangle rasterization using edge functions and barycentric coordinates
- Perspective projection with configurable field of view
- Z-buffering for correct depth sorting
- Perspective-correct interpolation for depth values
- FPS camera with mouse look (yaw/pitch) and WASD movement
- 3D transformations with rotation matrices
Requirements & Controls¶
Requirements¶
- LÖVE2D 11.3 or higher
- Lua 5.1+
Running¶
Controls¶
- Mouse: Look around
- W/A/S/D: Move forward/left/backward/right
- ESC: Quit
Explanation¶
-
Learn how triangle rasterization works in LÖVE2D
-
Understand perspective projection and coordinate transformations
-
Implement FPS-style camera controls with mouse and keyboard
-
Solve visibility problems with depth buffering