A C++ raytracer for configurable scenes, lighting and reflections.
A still life with spheres, a torus, a tanglecube and soft reflections.
| Primitives | Materials |
|---|---|
![]() |
![]() |
| Tanglecube | Reflections |
|---|---|
![]() |
![]() |
Three spheres under red and blue point lights.
One sample per pixel (left) and adaptive 8/16-sample antialiasing (right).
The renderer casts primary rays through a configurable camera. Scenes can contain spheres, planes, cylinders, cones, pyramids, toruses and tanglecubes, lit by point or directional lights. Shading includes ambient and diffuse light, shadows, specular highlights and floor reflections.
Scenes are libconfig files. The preview uses SFML; the final image is written as a PPM after the preview window closes.
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build -j
./raytracer scenes/showcase.cfgClose the preview window to write output.ppm.
See BUILD.md for dependencies, scenes/README.md
for the included scenes, and CREDITS.md for credits.
EPITECH students: do not copy this code. Using it as your own work is cheating and can lead to disciplinary action.



