A 3D software renderer written in Rust, rendered entirely in the terminal. No GPU required.
A software rasterizer built from scratch in Rust. No GPU, no OpenGL β pure CPU rasterization rendered to the terminal via ANSI escape codes.
- Software rasterization with programmable vertex/fragment shaders
- Sutherland-Hodgman near-plane frustum clipping
- Per-pixel depth buffering with bounding-box edge-function rasterizer
- Perspective-correct texture mapping with bilinear sampling
- Directional lighting with two-sided Lambertian diffuse + Blinn-Phong specular
- Keyframe animation system with linear, smooth, and step interpolation
- Morph target vertex animation (Suzanne smile demo)
- OBJ model loading with automatic triangle reduction
- ASCII and 24-bit true color rendering modes
- Parallel terminal output via rayon
- Adaptive resolution on terminal resize
- 5 built-in demo scenes with choreographed camera paths
- Interactive camera controls (orbit, zoom, pause)
# ASCII mode (default) - launches demo reel
cargo run --release
# 24-bit true color mode (recommended)
cargo run --release -- --color
# Load a custom OBJ model
cargo run --release -- model.obj --color
# Load with a texture
cargo run --release -- model.obj --texture diffuse.png --color| Key | Action |
|---|---|
| 1-5 | Switch demo scene |
| Tab | Next demo |
| WASD / Arrows | Orbit camera (manual override) |
| +/- | Zoom in/out |
| Space | Pause/resume |
| Q | Quit |
- Triforce - Golden Triforce with breathing orbit camera
- Suzanne - Blender's monkey head with animated smile morph
- Torus - Golden torus with swooping camera
- Spaceship - Hand-modeled ship with flyby camera
- Goblet - Lathe-turned golden goblet with elegant orbit
src/
βββ engine/
β βββ raster/ # Rasterizer, clipping, shaders, depth buffer
β βββ render/ # Scene, camera, renderer, materials, textures
β βββ terminal/ # ASCII & color terminal output (parallel)
β βββ animation/ # Keyframe animation with interpolation
βββ loader/ # OBJ file loading & geometry reduction
βββ main.rs # App, demos, camera choreography
models/ # Bundled OBJ models (Blender exports)
cargo build --releaseMIT
