Runs with 28ms on my Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz
You can see more showcase images in this file: Showcase.md
A CPU Rasterizer written in Rust between Block B and C during Y2 in BUas.
This personal project served as my introduction to the Rust programming language. I looked into all of the quality-of-life improvements this language supports over C++ like easy CI/CD, formatting, and warning handling (linting).
I wrote this project as part of a masterclass held at the university. At the end of the masterclass, there was a competition for the most impressive rasterizer. My renderer was chosen and I won a little 3D-printed Ferris The Crab, Rust's mascot.
Thanks to this and previous school projects I was selected to intern at Traverse Research for their "Summer of Code" internship program.
- Basic glTF Model Loading
- Frustum Culling
- Multithreaded Fragment Shader
- Textures
- Samplers (ClampToEdge, Repeat, Mirror)
- Clipping and Backface Culling
- Normals Rendering
- Vertex Colors
(Switch render modes with M1 and M2)
- Basic Lambertian Albedo shading
- Vertex Color
- Albedo
- Albedo + Vertex Color
- Model Vertex Normal
- Model Texture Coordinates
- Barycentric View
- Depth View
- Aabb View
- Make sure you have Rust installed.
- Clone the project:
git clone https://github.com/thepaladon/rust_erizer
- Inside the project directory run:
cargo run -r
Note: Running the project in Release (-r)
is a must since the rendering code runs on the CPU.
- W/A/S/D - move around the camera
- R / F - move up/down
- Mouse - Rotate the Camera
- Note: I've written this in a terrible way which teleports your mouse around, sorry about that 🙏
- Right Click - Next View Mode
- Left Click - Previous View Mode
- Left and Right Bracket ("[" "]") - Change Scene
- B - Load Sponza
- N - Unload Sponza
- M - unlock / lock mouse