This is an example project of a raytracer written in Rust. I've included 8 examples that showcase development, step by step.
The algorithms come from an example raytracer that was written in Processing4 (= A Java framework for creative programming). It was written by one of my professors at HTL Rennweg, here is a link to his blog.
Because it was originally written in Java, I had to rework how the rendering was going to take place since I'm using Rust. I additionally added some new features such as HDRI sampling for the background.
To run an example you have to have the Rust programming language installed, visit it's website in order to find instructions on how to download and install it. After that you just have to run:
cargo run --release --example <EXAMPLE>
Replace <EXAMPLE>
with one of the examples listed in the Cargo.toml file or in the examples folder.
cargo run --release --example 01planes
cargo run --release --example 02spheres
cargo run --release --example 03lights
cargo run --release --example 04pointlights
cargo run --release --example 05diffuse
cargo run --release --example 06specular
cargo run --release --example 07reflection
cargo run --release --example 08background