Offline GPU Path Tracer
Progressive spectral Monte Carlo GPU path tracer in Slang and C++ using Vulkan
An interactive progressive path tracer built with Slang, C++, and Vulkan. It runs in real time, but the image converges over multiple frames: camera movement stays responsive while temporal accumulation builds the final result. The compute-shader renderer uses custom BVH traversal and does not rely on hardware ray tracing.
For a technical report, implementation details, build instructions, and the complete gallery, see the project README.
Interactive rendering and animation
Each frame advances a single path bounce. The accumulated image converges while the scene remains unchanged;
moving the camera or changing the scene resets that accumulation. FPS camera controls use the mouse and
WASD, with Q and E for altitude. The left and right arrow keys step through
time. Press R to lock the view and start an automated render sequence, or Escape to exit.
Scene animations can use a variable time step, so sequences can run in slow motion, reverse, or fast-forward. Automated sequences rebuild the scene at each time step and render a configurable number of images and accumulated frames per image.
Project features
- Sphere primitives
- Triangle primitives with OBJ loading
- Gaussian splat primitives with PLY loading
- BSDF material support including IOR and metallic parameters
- Mesh lights
- Progressive Monte Carlo path tracing with temporal accumulation and interactive camera
- Stratified spectral sampling
- Transforms (location, rotation, and scale)
- Instancing, nested collections, and partially supported self-referencing instances
- Stack-based binary AABB TLAS paired with threaded BLAS traversal
- Threaded, binary AABB, 8-wide AABB, and 8-wide k-DOP traversal implementations
- CPU LBVH construction and mixed transform, primitive, and acceleration-structure nodes
- Animated scenes with manual time steps and automated render sequences
What these features enable
Nested collections let a scene reuse groups of instances instead of duplicating every primitive. This keeps scene representation and construction costs lower for repeated geometry. Self-referencing collections can also describe recursive patterns, though that path is currently limited by the transform stack.
Implementation details
The traversal hierarchy separates top-level scene structure from per-instance geometry: a stack-based binary AABB TLAS handles transforms and collections, while threaded traversal handles BLAS instances. This keeps the top-level stack small while retaining fast traversal within meshes. Several binary and wide-node traversal strategies are implemented and compared; the current scene setup uses binary AABBs for the TLAS and threaded AABBs for the BLAS.
Gaussian splat intersections use each splat's covariance and center. Monte Carlo sampling across rays approximates alpha blending, enabling transparent 3D Gaussian scenes within the same path-tracing pipeline.
References and related work
- Sun et al., "Stochastic Ray Tracing of Transparent 3D Gaussians"
- Benjamin Feldman, "3D Gaussian Splatting in a Weekend"
- Arman Uguray, "Ray Tracing: GPU Edition"
- Vaidyanathan, Karthik, Sven Woop, and Carsten Benthin, "Wide BVH Traversal with a Short Stack"
- Torres, Roberto, Pedro J. MartÃn, and Antonio Gavilanes. "Ray casting using a roped BVH with CUDA."
If you were looking for my CPU path tracer instead, you can find it here.