For the time being,
flow uses a single render pass instance with two distinct subpasses. The first subpass involves two floating-point images in a "ping-pong" arrangement. This is how the light accumulates over the course of many frames, leading to a well-converged image. Whichever of the two images was used as a color attachment during this first subpass serves as an input attachment to the next (and final) subpass. Input attachments are unique to Vulkan and allow a render pass attachment to be read in a fragment shader stage during a subpass. Input attachments come with several restrictions and do not support random access like a typical
sampler2D, for example.
The second subpass simply reads from this input attachment and writes to one of the swapchain images that are presented to the screen.
As such, there are two separate graphics pipelines - one that runs the main path tracing routine and another that normalizes the accumulated light (converts it from HDR to
[0..1]) and writes to the corresponding swapchain image.
Built on top of vkstarter.
- Windows 8.1, Windows 10
- NVIDIA GeForce GTX 970M, NVIDIA GeForce GTX 980
- Vulkan SDK
- Visual Studio 2015.
- Clone this repo.
- Inside the repo, create a new folder named
- Download the Vulkan SDK for Windows. Make sure the
VK_SDK_PATHenvironment variable is defined on your system.
- Download the GLFW pre-compiled binaries (64-bit Windows) and place inside the
third_partydirectory. Rename this folder to
- Optionally, run
vkstarter/compile.batto convert the included
SPIR-V. This will be run automatically as a pre-build event by Visual Studio.
- Open the Visual Studio 2015 solution file.
- Build the included project.
NOTE: There appears to be a bug in
vulkan.hpp, which requires one to change line
ObjectDestroy<NoParent> deleter( *this, allocator );
ObjectDestroy<NoParent> deleter( allocator );
- Tone mapping and exposure adjustment
- Explicit light sampling
- Russian roulette path termination
- Reflective materials (dielectrics)
- Improved BRDFs (GGX, Cook-Torrance, etc.)
- Spatial acceleration data structures (most likely some form of GPU KD-tree)
- Scene format (
.json) and parser
- Screenshot utility