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 the SBVH. 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 the SBVH. 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.
- 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 LOD is calculated using two different techniques; primary rays use ray differentials Igehy 1999, subsequent bounces use ray cones Möller et al. 2019. Ray differentials achieve the best quality, but are expensive due to their large memory consumption (12 floats per Ray). Only using them for primary Rays allows for some shortcuts computation-wise and primary hits are where texture aliasing matters most anyway.
- 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.
- Primary Ray Rasterization: Optionally, primary rays can be rasterized using OpenGL, before being propagated further as bounced rays in CUDA.
- Multiple Material types
- Microfacets (Beckmann and GGX models)
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
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.