This project is my version of the "Ray Tracing: In a Weekend," and "Ray Tracing: The Next week," course. The raytracer itself follows much of the design of the book, however I've swapped from writing to a PPM file (as my write speeds are rather slow) over to using SDL for rendering. I've also utilized a few modern C++ techniques such as parallelizing the main render loop using std::execution::par to distribute work across all available CPU cores.
SDL2 is included in the repository under SDL2-2.26.5/, so no manual setup is required. Simply clone the repo, open the solution in Visual Studio, and build.
This was the final render utilizing a sample size of 10,000 (vectors per px), and a max bounce of 50. This was a showcase of all features learned thus far for lambertian, metallic, dielectric, and diffuse materials. Constant medium isotropic fog to cover the scene as well as its interactions with light. Reflective, refractive, and absorption of color data. Texture wrapping on a spherical shape with dynamic scaling. As well as a Bounding Volume Hierarchy to speedup runtime:

This image was with a very low sample size and bounce for a fairly quick write speed (<5 minutes). Metallic and lambertian objects reflect the correct amount and a depth of field effect is applied to objects far away:

This image was utilizing a much larger sample size of around 500 (vectors per px) and a bounce of around 200. This led to a bit of color bleed where even lambertian objects appeared mirror-like. This is far from ideal as it does not appear normal, however it is an interesting effect nonetheless!

Repeated sin wave texture mapping to the ground:
Perlin noise with no background and a light source:
Not a showcase of the raytracer itself, however a neat result of turning the sample size down very low on the final image render. This was a sample size of 2 (vectors per ppx) and a max bounce of 2. Overall render took less than a minute:


