Real-time path tracing library and sample
Path Tracing SDK is a code sample that strives to embody years of ray tracing and neural graphics research and experience. It is intended as a starting point for a path tracer integration, as a reference for various integrated SDKs, and/or for learning and experimentation.
The base path tracing implementation derives from NVIDIA’s Falcor Research Path Tracer, ported to approachable C++/HLSL Donut framework.
GTC presentation How to Build a Real-time Path Tracer provides a high level introduction to most of the features.
/bin | default folder for binaries and compiled shaders |
/build | default folder for build files |
/donut | code for a custom version of the Donut framework |
/donut/nvrhi | code for the NVRHI rendering API layer (a git submodule) |
/external | external libraries and SDKs, including NRD, RTXDI, and OMM |
/media | models, textures, scene files |
/tools | optional command line tools (denoiser, texture compressor, etc) |
/pt_sdk | Path Tracing SDK core; Sample.cpp/.h/.hlsl contain entry points |
/pt_sdk/PathTracer | Core path tracing shaders |
At the moment, only Windows builds are supported. We are going to add Linux support in the future.
Clone the repository with all submodules recursively:
git clone --recursive https://github.com/NVIDIAGameWorks/Path-Tracing-SDK.git
Pull the media and other non-git-hosted files:
cd Path-Tracing-SDK
update_dependencies.bat
Create a build folder.
mkdir build
cd build
Any folder name works, but git is configured to ignore folders named build\*
Use CMake to configure the build and generate the project files.
Use of CMake GUI is recommended but cmake ..
works too. Make sure to select the x64 platform for the generator.
Build the solution generated by CMake in the build folder.
Open the generated solution (i.e. build/PathTracingSDK.sln
) with Visual Studio and build it.
Select and run the pt_sdk
project. Binaries get built to the bin
folder. Media is loaded from media
folder.
If making a binary build, the media
and tools
folders can be placed into bin
and packed up together (i.e. the sample app will search for both media\
and ..\media\
).
Due to interaction with various included libraries, Vulkan support is not enabled by default and needs a couple of additional tweaks on the user side; please find the recommended steps below:
Once the application is running, most of the SDK features can be accessed via the UI window on the left hand side and drop-down controls in the top-center.
Camera can be moved using W/S/A/D keys and rotated by dragging with the left mouse cursor.
-scene
loads a specific .scene.json file; example: -scene programmer-art.scene.json
-width
and -height
to set the window size; example: -width 3840 -height 2160 -fullscreen
-fullscreen
to start in full screen mode; example: -width 3840 -height 2160 -fullscreen
-adapter
to run on a specific GPU in multi GPU environments using a substring match; example: -adapter A3000
will select an adapter with the full name NVIDIA RTX A3000 Laptop GPU
-debug
to enable the graphics API debug layer or runtime, and the NVRHI validation layer.We are working on more detailed SDK developer documentation - watch this space!
Path Tracing SDK is under active development. Please report any issues directly through GitHub issue tracker, and for any information, suggestions or general requests please feel free to contact us at [email protected]!
See LICENSE.txt