Code Monkey home page Code Monkey logo

flow's Introduction

flow

๐Ÿ”ฎ A GPU-based progressive path tracer written in Vulkan.

screenshot

Description

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.

Tested On

  • Windows 10 Pro
  • NVIDIA GeForce GTX 1070
  • Vulkan SDK 1.1.92.1
  • Visual Studio 2017

To Build

  1. Clone this repo.
  2. Inside the repo, create a new folder named third_party.
  3. Download the Vulkan SDK for Windows. Make sure the VK_SDK_PATH environment variable is defined on your system.
  4. Download the GLFW pre-compiled binaries (64-bit Windows) and place inside the third_party directory. Rename this folder to glfw.
  5. Optionally, run vkstarter/compile.bat to convert the included GLSL shaders to SPIR-V. This will be run automatically as a pre-build event by Visual Studio.
  6. Open the Visual Studio 2015 solution file.
  7. Build the included project.

To Do

  • Tone mapping and exposure adjustment
  • Explicit light sampling
  • Russian roulette path termination
  • Refractive materials (dielectrics)
  • Improved BRDFs (GGX, Cook-Torrance, etc.)
  • Spatial acceleration data structures (most likely some form of GPU BVH)
  • Scene format (.json) and parser
  • Screenshot utility

License

ยฉ๏ธ The Interaction Department 2018

Creative Commons Attribution 4.0 International License

flow's People

Contributors

mwalczyk avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.