Skip to content

HomeroRR/CUDA_ray_tracing

Repository files navigation

CUDA Ray Tracing

Accelerate your code 10x or more with CUDA.

Prerequisites

  • 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

How To Run in Windows

  • Set the CUDATOOLKITDIR environment variable to the location of your CUDA Toolkit.
    set CUDATOOLKITDIR=<Path\to\Toolkit\CUDA\v11.4>
  • Run cmake to configure your project.
    cmake . -G "Visual Studio 16 2019" -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo
    You can change to flags to set a different generator -G or a different build folder -B
  • Open the generated solution in Visual Studio and compile main.exe
  • Run main.exe > image.ppm to generate the following image: image

Corrections

Work is still in progress. If you spot errors or have suggested corrections, please submit issues via GitHub.

Acknowledgements

We thank Peter Shirley for his fantastic books on raytracing which were the original inspiration for this project. Link to his books.

About

Accelerate ray tracing with CUDA

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published