Interactive Path Tracer in CUDA.
- Sphere and triangle mesh primitives
- obj file loading
- BVH (bounding volume hierarchy) acceleration
- Edge-Avoiding À-Trous Wavelet Transform denoising
You need to have a recent version of C++ compiler (Visual Studio , GCC, or Clang), CMake 3.17+, CUDA Toolkit, and Conan package manager installed.
To install conan, you need have a recent Python installed, and then you can do:
$ pip install conan
Afterwards, you can invoke CMake in command line to build the project
$ mkdir build
$ cd build
$ cmake -DCMAKE_BUILD_TYPE=Release ..
$ cmake --build .
or alternatively use your IDE's CMake integration.
nvcc fatal : Cannot find compiler 'cl.exe' in PATH nvcc fatal : Could not set up the environment for Microsoft Visual Studio
The way NVCC parse Windows PATH environment variable seems to be brittle. A reliable way is to clear the Path variable
and only set the location of cl.exe
to the path. For example:
Path=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64\
The executables should be under the bin
directory of the build directory:
cuda_pt
is the main executable. The usage iscuda_pt [option] <filename>
, where<filename>
refers to scene files. By default, it executes in interactive mode, but with--output <output filename>
option it runs in command line mode.test
runs unit tests
One sample-per-pixel output | Edge-Avoiding À-Trous Wavelet Transform |
---|---|
This project consults the following resources and papers
- Ray Tracing in One Weekend book series
- Physically Based Rendering: From Theory To Implementation 3rd edition
- Course slides from University of Pennsylvania CIS 565 GPU Programming and Architecture and Dartmouth CS 87 Rendering Algorithms
- Denoising
This project uses the following excellent third-party dependencies
- CUDA SDK
- Thrust - High level CUDA algorithm library
- Assimp - Asset loading
- JSON for Modern C++ - Json loading
- stb - Image reading/writing
- glm - Math
- fmt - String Formatting
- cxxopts - Command Line Parsing
- tl-function-ref - A
function_ref
implementation
- Catch2 - Testing
- glad - OpenGL loader
- GLFW - Window and input
- Dear ImGui - GUI
This repository is released under the MIT license, see License for more information.