weekend ray tracer
This is a toy ray tracer written in Rust, following "Ray Tracing in One Weekend"
Spheres, shaded by their normals, with no antialiasing
Spheres, shaded by their normals, with antialiasing
Mirror spheres, no gamma correction
Lambertian spheres, with gamma correction
Lambertian and mirror spheres
I used these sources for reference and inspiration to help me with this project. For the more core ray-tracing part, I used the classic book Ray Tracing in One Weekend. I also referenced a tutorial on writing a ray tracer in Rust, since I wanted to make sure I was using proper Rust conventions when writing this.
I'm also using nalgebra as my linear algebra library.
To run tests:
RUSTFLAGS="-C target-cpu=native" cargo build --release
RUSTFLAGS="-C target-cpu=native" cargo run --release
In order for the renderer to be able to output images, you will need to create the output folder, otherwise it will panic and fail.