A 3D renderer written in Rust. Entirely software based, so no graphics card needed! This renderer was created as part of this excellent course by Gustavo Pezzi.
- OBJ file rendering, with PNG texture support
- Per face lighting
- Backface culling
- FPS style camera control
- Wireframe mode
- Controllable model translation, rotation, and scaling
- Projective space clipping
- Rendering of scenes defined in JSON
- Subpixel rasterization
cargo run --release <path to mesh.obj or scene.json>
Button | Function |
---|---|
W | Move camera forward |
A | Move camera left |
S | Move camera backwards |
D | Move camera right |
Space | Move camera up |
Left control | Move camera down |
Left arrow | Rotate camera left |
Right arrow | Rotate camera right |
Up arrow | Rotate camera up |
Down arrow | Rotate camera down |
Left shift | Move camera faster |
1 | Vertex rendering with wireframe |
2 | Wireframe rendering |
3 | Filled face rendering |
4 | Filled face rendering with wireframe |
5 | Textured rendering |
6 | Textured rendering with wireframe |
7 | Depth buffer view |
C | Toggle backface culling |
L | Enable shading |
U | Disable shading |
T | Toggle model translation |
R | Toggle model rotation |
G | Toggle model scaling |
X | Toggle model rotation around the x-axis |
Y | Toggle model rotation around the y-axis |
Z | Toggle model rotation around the z-axis |
P | Reset model rotation |
F | Flip texture UVs (useful if the model's texture is upside down) |