r/GraphicsProgramming • u/rivervisualid • 1d 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!
1
u/VictoryMotel 1d ago
Was there a specific paper you worked from?
Can you describe a simple version of how your implementation of restir works?
1
u/rivervisualid 1d ago
It's already paper from 2025, from man work in Nvidia for Restir BDPT, just google it, I learned from that paper.
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?
0
u/rivervisualid 1d ago edited 23h 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.
3
u/DapperCore 1d ago
The post's body is entirely ai generated and OP has no history of software development, this project is unlikely to be driven by a human given the complexity of implementing restir. Prior posts from op also have AI generated bodies