Accelerate your code 10x or more with CUDA.
- NVIDIA Toolkit >= 11.4 (Check the NVIDIA website for latest installation steps)
- NVIDIA GPU with compute >= 7.5 (Verify whether your device qualifies at the cuda-gpus website)
- cmake >= 3.8
- Set the
CUDATOOLKITDIRenvironment variable to the location of your CUDA Toolkit.set CUDATOOLKITDIR=<Path\to\Toolkit\CUDA\v11.4>
- Run cmake to configure your project.
You can change to flags to set a different generator
cmake . -G "Visual Studio 16 2019" -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo
-Gor a different build folder-B - Open the generated solution in Visual Studio and compile main.exe
- Run
main.exe > image.ppmto generate the following image:
Work is still in progress. If you spot errors or have suggested corrections, please submit issues via GitHub.
We thank Peter Shirley for his fantastic books on raytracing which were the original inspiration for this project. Link to his books.