This is my own implementation of Ray Tracing in a weekend by Peter Shirley. It’s pretty simple and follows the book closely. The the two main modifications I made were using stb_image.h to output .png files and reorganizing the data a little so that the computation could be parallelized using OpenMP. The performance gain was great compared to the small amount of work it required.

If you’re not familiar with the book it involves creating a simple ray tracer from scratch. This means everything from geometry, to camera code and math classes. The main features include a procedural background, analytical spheres for geometry, a simple shading model allowing diffuse, metallic and dielectric materials, multiple sampling antialising and finally depth of field.

The next step was obviously going to be implementing the other books but unfortunately, I was finishing the equivalent of my master’s thesis at the time and didn’t get around to do it.

Ray Tracing In A Weekend
Ray Tracing In A Weekend - 1000spp@1920x1080p