/path-tracer

Real time path tracing engine

Primary LanguageRust

Path tracer

Summary

A real-time 3D path tracing engine, running on the GPU, built with Rust and wgpu.

Features

  • flying camera to move around
  • progressive rendering (If you stand still the engine will start to accumulate previous frames over time and average the pixels together, thus greatly reducing noise.)
  • converting equirectangular HDRIs to cubemaps (which can then be used for the skybox)
  • storing polygons in a Bounding Volume Hierarchy, so they can be traversed in logarithmic time
  • user interface for making changes at runtime, such as:
    • adjusting the renderer's settings
    • modifying the scene (adding and removing objects, modifying their properties, etc.)
  • selecting objects with the cursor (this currently only works for spheres, not complex meshes)
  • loading models from .obj files

Future plans

  • saving and loading scene data
  • implementing textures
  • implementing a denoiser(?)
  • moving the whole thing to Vulkan, making it possible to utilize the raytracing cores on RTX GPUs
  • DLSS (??)

Running and building

You will need the Rust toolchain. (You can install it using rustup.)

Running (in debug mode):

cargo run

Building in release mode:

cargo build --release

Gallery

bunny cornell-2 cornell 3-balls image image image image