CIS 565: GPU Programming and Architecture Final Project
This is the final project for CIS 565: GPU Programming. The goal of the project is to implement ‘Spatiotemporal Reservoir Resampling for Real-Time Ray Tracing with Dynamic Direct Lighting’ or ReSTIR using Vulkan. It enables the usage of a large number of point and surface lights and the rendering of their shadows by combining various sampling techniques. Since the algorithm uses ray tracing for visibility testing, we explore using the Vulkan extension VK_KHR_ray_tracing
for ray tracing. In addition, we also use Vulkan’s compute shader to implement a ray tracer, and compare the performance differences between the two methods. Besides, you can find a detailed proposal of this project here: Pitch Link.
-
Prerequisites on Windows:
-
Visual Studio 2019
-
The following packages:
- GLFW3
- Vulkan SDK
- Dear ImGUI with glfw and Vulkan bindings
These packages can be installed easily using vcpkg.
-
Nvidia Vulkan driver that supports the
VK_KHR_ray_tracing
extension. See https://developer.nvidia.com/vulkan-driver, section 'Khronos Vulkan Ray Tracing'.
The code was written with portability in mind, but it has not been tested on other platforms.
-
-
Clone this repository with the
--recurse-submodules
flag. -
Build the project using the standard CMake building process. The executable expects the compiled shaders to be located in
shaders/
, and while this is usually automatically guaranteed by the building process, in some configurations they may need to be manually copied.
Specify GLTF scene files using the -scene
flag. If the scene contains point lights that are used to simulate the effects of area lights, they can be ignored using -ignore_point_lights
. If the scene doesn't contain any point lights or objects with emissive materials, a number of point lights will be randomly scattered in the scene. Currently this is hard-coded in sceneBuffers.h.
Here are some models provided by Nvidia converted to GLTF format. Some additional sample models can be found at https://github.com/KhronosGroup/glTF-Sample-Models.
- GBuffer generation.
- Compute shader raytracing.
- Vulkan RT pipeline raytracing.
- GLTF scene loader.
- Reading the paper and understanding the algorithm.
- Baised ReSTIR Algorithm.
- Disney Principle BRDF Materials.
- Unbiased ReSTIR algorithm
- Experiments and data collection