Skip to content

Latest commit

 

History

124 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MIT

Simple Pathtracer

Simple path tracing project in Rust.

I also have a ray tracer and I intend to explore the difference between both techniques.

Usage

Scenes are TOML files (see scenes/) with render settings, tone mapping, camera, environment, named materials and shapes:

cargo run --release -- render scenes/cornell.toml            # CPU
cargo run --release -- render scenes/outdoor.toml --gpu       # GPU
cargo run --release -- render scenes/cornell.toml --gpu --spp 100 --width 400 --height 300
cargo run --release -- view scenes/outdoor.toml               # interactive GPU viewer

Renders land in output/. The examples/ directory has the same scenes built in Rust; run one with cargo run --release --example cornell -- --gpu.

Features: CPU and GPU (wgpu compute) path tracing; spheres and discs; Lambertian, metal (GGX), dielectric, emissive and principled (metallic/roughness/transmission) materials with checker and bitmap textures; area lights with next event estimation and multiple importance sampling; constant, HDR image and Preetham procedural skies plus a sun; a Sobol sampler; thin-lens depth of field; exposure, tone mapping and bloom; an optional firefly clamp.

Some pictures generated

1 2 3 4 5

About

Path tracer in Rust.

Resources

Stars

6 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages