dhawals1939 / ReSTIR-OptiX

ReSTIR implemented using OptiX.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ReSTIR-OptiX

Reproduce Spatiotemporal Reservoir Resampling for Real-Time Ray Tracing with Dynamic Direct Lighting in OptiX.

This program will load a gltf scene (path is passed through command line arguments) and render it using ReSTIR. Emissive meshes will be treated as light sources. A simple ImGui window can be used to modify some parameters of ReSTIR.

Environment map is currently not supported.

Maybe there are some bugs in implementation of MIS unbiased spatial reuse, the result looks worse.

Dependencies

One may download and install these through site of NVIDIA.

  • CUDA
  • OptiX 7 SDK

These dependencies are added as git submodules.

One may install these dependencies manually or use vcpkg.

Besides, C++20 and OpenGL 4.5 are used.

ReSTIR

4 Passes

  1. G-buffer
    • in src/shaders/gbuffer.vert & src/shaders/gbuffer.frag
  2. Sample to lights, visibility reuse, temporal reuse
    • in src/raytracing/sample.cu
  3. Spatial reuse
    • in src/raytracing/spatial.cu
  4. Lighting
    • in src/raytracing/lighting.cu

About

ReSTIR implemented using OptiX.


Languages

Language:C++ 75.5%Language:Cuda 17.5%Language:CMake 4.4%Language:GLSL 2.6%