Skip to content

atomicbeef/software-renderer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

software-renderer

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.

Features

  • 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

Usage

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)

Screenshots

Jets Wireframe Jets Unlit Sphere Crab Lit Crab Depth

About

A software renderer written in Rust

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages