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.

GPU path tracer scene with transformed spheres
Transform hierarchies make it possible to build scenes from reusable geometry.
Gaussian splat interior rendering
Gaussian splats are loaded from PLY and sampled stochastically during path tracing.

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

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.

Nested scene containing eight billion Suzanne instances with sphere mesh lights
A nested collection represents an eight-billion-instance Suzanne scene.
Progressive render converging with stratified wavelengths
Screen recording of the progressive render converging with stratified wavelengths.

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

If you were looking for my CPU path tracer instead, you can find it here.