A simple raytracer in C, with diffuse and specular lighting, reflections, shadows, environment map, and a couple other features. Developed following the tutorial "Understandable RayTracing in 256 lines of bare C++" and "Ray Tracing in One Weekend".
Currently, the program takes no arguments and outputs the image directly
to stdout
(in PPM format).
$ git clone --recurse-submodules # required for the libs
$ make
$ ./raytracer >out.ppm # or ./raytracer | display
You can change the rendering parameters at config.h
.
Code is licensed under GPLv2. Other assets:
assets/tiles.png
: https://polyhaven.com/a/large_grey_tiles by Rob Tuytel (under CC0)assets/neon-studio.jpg
: https://polyhaven.com/a/neon_photostudio by Sergej Majboroda (under CC0)