A simple raytracer, based on Ray Trancing in One Weekend.
cmake
g++
libncurses5-dev
Either use the vscode tasks cmake
and build
or manually:
$ mkdir build && cd build
$ cmake ..
$ cmake --build .
Run the script using:
$ ./build/src/tracer > image.ppm
$ mogrify -format jpg *.ppm # optional
A single object in the scene.
Coloring the sphere based on the direction of the normal vector (first image is a bug).
Adding more objects to our world.
Adding anti-aliasing with 5, 10, and 50 samples for pixel, respectively.
Adding a mate texture to our spheres with 10 and 100 samples per pixel, respectively.
Removing shadow acne.
Improving light reflection by using a lambertian distribution.
Applying gamma correction.
Adding new materials: lambertian and fuzzy metal.
Adding new materials: dielectrics and hollow glass sphere.
Improving the flexibility of the camera.
Adding mate and shiny iridescent materials.
Adding defocus blur to camera.
Final scene of book one (took 24 minutes to render on 8 cores 🤡).
First pass at creating a real-time rendered.
Animated camera to make real-time animations.
Precomputed frames assembled afterwards, with variying anti-aliasing.
Bouncing spheres.
BVH
For performance analysis, see perf.