Interactive CUDA pathtracer that implements a variety of rendering techniques.
- Wavefront rendering, see Laine et al. 2013
- Multiple BVH types
- Standard binary SAH-based BVH
- SBVH (Spatial BVH), see Stich et al. 2009. This BVH is able to split across triangles.
- QBVH (Quaternary BVH). The QBVH is a four-way BVH that is constructed by iteratively collapsing the Nodes of a binary BVH. The collapsing procedure was implemented as described in Wald et al. 2008.
- CWBVH (Compressed Wide BVH), see Ylitie et al. 2017. Eight-way BVH that is constructed by collapsing a binary BVH. Each BVH Node is compressed so that it takes up only 80 bytes per node. The implementation incudes the Dynamic Fetch Heurisic as well as Triangle Postponing (see paper). The CWBVH outperforms all other BVH types.
- BVH Optimization. The SAH cost of binary BVH's can be optimized using a method by Bittner et al. 2012.
- All BVH types use Dynamic Ray Fetching to reduce divergence among threads, see Aila et al. 2009
- Two Level Acceleration Structures
- BVH's are split into two parts, at the world level (TLAS) and at the model level (BLAS). This allows dynamic scenes with moving Meshes as well as Mesh instancing where multiple meshes with different transforms share the same underlying triangle/BVH data.
- SVGF (Spatio-Temporal Variance Guided Filter), see Schied et al. Denoising filter that allows for noise-free images at interactive framerates. Also includes a TAA pass.
- Importance Sampling
- Next Event Estimation (NEE): Shadow rays are explicitly aimed at light sources to reduce variance.
- Multiple Importance Sampling (MIS): Explicit light sampling (NEE) is combined with standard BRDF sampling using MIS to get the best of both.
- Cosine weighted direction sampling for diffuse bounces.
- Microfacet sampling as described in Walter et al. 2007
- Mipmapping: Textures are sampled using mipmapping. Mipmap sampling is done using ray cones (see Möller et al. 2012, Möller et al. 2019). Primary rays perform anisotropic sampling, subsequent bounces use isotropic sampling.
- Blue Noise Sampling: The low discrepency sampler by Heitz et al. 2019 is used. This sampler distributes Monte Carlo errors as a blue noise in screen space.
- Hot Reloading: When F5 is pressed the CUDA module is destroyed, recompiled, and reloaded.
- Multiple Material types
- Diffuse
- Dielectrics
- Microfacets (Beckmann and GGX models)
SVGF: Raw output of the pathtracer on the left and the filtered result on the right.
Camera can be controlled with WASD for movement and the arrow keys for orientation. Shift and space do vertical movement.
Various configurable options are available in Common.h
.
The project uses SDL and GLEW. Their dll's for x64 are included in the repository, as well as all required headers.
The project uses CUDA 11.0 and requires that the CUDA_PATH
system variable is set to the path where the CUDA 11.0 SDK is installed.