Rust implementation of Peter Shirley's "Ray Tracing in One Weekend"
Last updated Jun 22, 2026
93
Stars
6
Forks
1
Issues
0
Stars/day
Attention Score
36
Language breakdown
No language data available.
โธ Files
click to expand
README
Ray tracing in one weekend, in Rust
This is an implementation in Rust of Peter Shirley's "Ray Tracing In One Weekend" book. This is the first of the series:
- Ray tracing in one weekend, in Rust
- Ray tracing: the next week, in Rust
- Ray tracing: the rest of your life, in Rust
git clone this project. Then you can checkout a tag to retrieve the implementation at a specific chapter in the book.
For example, with git checkout tags/chapter_08.2 you get the implementation for the second image of chapter 8.
With git checkout master you go back to the latest version.
Instead of implementing my own vec3, I preferred using Vector3 from nalgebra crate. For random numbers I used rand.
Hence dependencies are:
What next
You can go on with my Rust implementation for the second book, "Ray tracing: the next week, in Rust".
Improvements
- I easily made the main loop parallel with the
rayoncrate.
Sync and then it's just a matter of using an intopariter() iterator.

๐ More in this category