A GPU implementation of a simple ray tracer. Some of the ray tracing features are from Ray Tracing in One Weekend and some are from Building a Ray Tracer in Python.
First clone the code:
git clone https://github.com/siavashadpey/renderrr.git
To compile the NVIDIA GPU implementation of the code, run the following commands from the main directory renderrr
:
mkdir build_parallel
cd build_parallel
cmake -DCUDA=ON ..
make
To compile the CPU implementation of the code, run the following commands from the main directory renderrr
:
mkdir build_serial
cd build_serial
cmake ..
make
Finally, run the code from build_parallel
(or build_serial
) to generate the ppm file:
./driver/three_balls