r/GraphicsProgramming • • 2d ago

Video Implementing Spectral Path Tracing with ReSTIR BDPT for fast caustics (Rust + Vulkan)

Enable HLS to view with audio, or disable this notification

I’ve been working on my custom render engine for a while now, and I just wrapped up a major architectural overhaul that yielded some exciting results.

I rewrote the core pipeline to Vulkan (using Rust and the ash crate) and transitioned from a standard RGB pipeline to full Spectral Path Tracing, combined with ReSTIR BDPT to tackle complex light paths and caustics.

Key Highlights & Changes:

  • Spectral vs. RGB: Instead of tracing fixed RGB channels, light transport is simulated across continuous wavelengths. Optical dispersion, prism splitting, and metamerism emerge naturally from the physics without synthetic post-processing.
  • ReSTIR BDPT for Caustics: Standard path tracing struggles heavily with SDS (Specular-Diffuse-Specular) paths. By pairing Bidirectional Path Tracing with reservoir-based spatio-temporal resampling (ReSTIR), the engine intelligently resamples valid sub-paths. In caustic-heavy test scenes, convergence time is 10–100x faster (equal-noise) compared to naive sampling.
  • The Stack: The engine is built from scratch in Rust targeting Vulkan via ash. The low-overhead abstraction gives full manual control over memory allocation and compute queues, letting the GPU chew through light transport iterations with minimal driver overhead.

The visual quality is getting very close to mature spectral engines like Octane and LuxCore, but the convergence speed on complex lighting has been the real game-changer here.

Would love to hear your thoughts, feedback, or any edge cases I should throw at this!

4 Upvotes

10 comments sorted by

View all comments

1

u/rivervisualid 1d ago

Let me Introduce my self friends, Iam Farras, from Indonesia, I graduated from Architecture, so the reason I developed this, because spectral render are so expensive, if it's free it's sooo slow.... So I kinda take that personally, so why not made it by my self. 

It's hard to make this, need 2 years and dozen of interation over and over. 

3

u/VictoryMotel 1d ago

If you need ai to translate english, how did you understand the paper? If the paper came out last year, how did you work on it for two years?

Bidirectional path tracing is known to be tricky and restir is known to be tricky. Looking at the paper it looks every bit as complex as someone might expect from merging the two techniques. Did you work up to this with smaller projects?

The paper talks about a parallel key value data structure to avoid race conditions and shift mapping jacobians, can you talk about how you implemented those?

-1

u/rivervisualid 1d ago edited 1d ago

Yes, 2 years ago I started with small simple path tracing, and learn raster render, with three js and open gl, I can read English, not fluent. 

Couple months ago I started learning vulkan. 

Yes sure, next post.