/raytracer

A simple raytracer written in C.

Primary LanguageCGNU General Public License v2.0GPL-2.0

Raytracer

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".

Example (Converted from ppm to png.)

Building and Running

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.

Credits and License

Code is licensed under GPLv2. Other assets: