Skip to content

Tenebryo/raymarching_voxels

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Experimental Voxel Raymarcher

This repository contains the source for my experiments with a raymarching voxel renderer, global illumination, and Vulkan.

Screenshots

These screenshots show the types of images the renderer can currently produce under the best circumstances. I'm still in the process of implementing improved sampling and denoising algorithms, so it doesn't look great while moving around yet.

sponza-arch sponza-balcony

Performance

On a RTX 2070 Super, the raycasting shaders can cast ~200M Mrays/s, depending on geometry, which corresponds to around 20 fps when computing lighting for every pixel. I plan on making a optimization pass later to improve this. Some of the SVDAG papers I reference cited similar or better performance on GTX 680 GPUs, which means I still have a ways to go.

Rendering Pipeline

The main path-tracing pipeline is implemented as compute shaders (detailed below), while the UI is just rendered by a simple graphics pipeline.

  • Primary Ray Intersection (intersect.comp)
  • Sample Reprojection (reproject.comp)
  • A-SVGF step 1: stratified sample replacement (TODO)
  • Lighting
  • A-SVGF step 2: generate alpha buffer (TODO)
  • TAA: use reprojected information and alpha buffer to mix current frame and reprojected samples (partially implemented)
  • Postprocessing: compute an autoexposure effect and map HDR light values to LDR.
  • Render

Building

As long as there is a Vulkan runtime on your system, all you should have to manually install is shaderc, which is required for vulkano-shaders to work. After that, cargo build --release should handle most of the work.

TODO

  • Optimize raycasting and compute shaders
    • Currently register file space seems to be an issue in some of the path tracing shaders.
    • Improve cache efficiency (only so much one can do with trees/DAGs)
  • Reproject second bounce lighting samples and other data for more light sample information.
  • Fully Implement A-SVGF
  • metropolis light transport for faster convergence
  • maybe implement some form of (jank) DLSS
  • Improve material capabilities
    • BRDF sampling (replace diffuse-only materials)
    • Transparent materials
      • Modify raycasting termination conditions
      • Integrate over

References

Here is list of papers and other resources I used while creating this system, sorted roughly by topic.

Voxels:

Lighting:

Denoising:

About

Experiments with voxel rendering

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published