Skip to content

A Rust implementation of Peter Shirley's Ray Tracing in One Weekend

Notifications You must be signed in to change notification settings

YukumoHunter/weekend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

weekend

Image

A Rust implementation of Peter Shirley's Ray Tracing in One Weekend.

Building

I recommend building in release mode, as it speeds the rendering up significantly.

cargo build --release

Upon running the program, a progress bar powered by indicatif will show the rendering progress per scanline.

Performance

The image above rendered in ~22 minutes on a laptop equipped with an AMD Ryzen 5 4500U. It was rendered at a resolution of 1200x800 with 1000 samples per pixel and a maximum of 50 bounces. It renders significantly faster on the next-week branch where a BVH is implemented.

In order to improve performance, I used vector classes from nalgebra and scanlines are rendered in parallel using rayon.

I plan on working through the other books in the series as well, where I hope to get another significant speedup from implementing some spatial acceleration structure.

About

A Rust implementation of Peter Shirley's Ray Tracing in One Weekend

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages