TheGoozah / CUDA_Ray_Tracer

CUDA accelerated Ray Tracer example for Graphics Programming course

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CUDA_Ray_Tracer

Partial CUDA accelerated implementation of the software ray tracer students have to write during the Graphics Programming 1 course. All source is written by myself. The ray tracer is still "Under Development" and will be extended with optimization techniques, transparency, triangle mesh supporty, etc. Next to the topics covered in class, this version also supports progressive indirect lighting using importance sampling based on the BRDF's.

A Nvidia GPU is required to run the demo. If you want to run the Visual Studio project, please use Visual Studio 2019 and have the CUDA SDK installed.

Interesting files

  • Tracer: the heart of the ray tracer, using CUDA to run on the GPU. All data is allocated on the GPU but, due to optimzations performed by the CUDA compiler, virtual functions potentially caused issues. I avoided using virtual functions instead.
  • Sampling: importance sampling based on BRDF. Normalization happens in the actul tracing.
  • BRDF's: all BRDF functions used in this ray tracer.
  • Resource Buffer: Buffer class to easily transfer memory from GPU to CPU and vice versa. It uses Unified Virtual Addressing to automatically figure out the location (GPU or CPU) of the referenced data. It also make memory management easier.
  • Intersection Algorithmes: implementation of intersection algorithms for most used geometric entities

About

CUDA accelerated Ray Tracer example for Graphics Programming course


Languages

Language:C 88.8%Language:C++ 8.5%Language:Cuda 1.2%Language:CMake 1.0%Language:Objective-C 0.5%