Skip to content
A simple path tracer built in Rust
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Fix sampling randomisation. Mar 4, 2019
.gitignore Added emissive lighting. May 26, 2018
Cargo.lock Upgraded rand to 0.6 Mar 4, 2019
Cargo.toml Upgraded rand to 0.6 Mar 4, 2019
LICENSE-APACHE Added readme and licenses. Apr 28, 2018
LICENSE-MIT Added readme and licenses. Apr 28, 2018

Rust Ray Tracing in a Weekend

This is a Rust implementation of the Raytracer described in Peter Shirley's Ray Tracing in One Weekend. It is indended for my own learning purposes. The initial implementation is faithfully following the book implementation. My intention is to use this as a test bed for playing with threading, SIMD and general optimizations in Rust and also to complete follow up books to Ray Tracing in a Weekend.

I found the book via Aras Pranckevičius' blog series on his toy path tracer experiments which was my inspiration for doing this, thanks Aras!

Compiling and running

Requires Rust 1.27 for SIMD support.

The easiest way to build and run the path tracer use the command:

cargo run --release

Using nightly will give slightly better performance due to use of std::intrinsics::cttz. To build with core intrinsics enabled make sure you have a nightly build of rustc installed and use the command:

cargo +nightly run --release --features core_intrinsics

If you build without the --release flag the application will be very slow!



You can’t perform that action at this time.