Skip to content

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

Notifications You must be signed in to change notification settings

manorajesh/riow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

riow - Ray Tracing in One Weekend

For the 5th time, I will be starting the Ray Tracing in One Weekend book in Rust

Postmortem

The biggest problem I encountered was with memory management: in particular with Rust's borrow checker. I totally ignored the concept of moved values, and thus, I needed to redo entire chapters because of my ignorance. I am beginning to understand the power of Rust's memory management model, but I still lack the fundementals; I got lots of reading to do.

I also encountered problems with porting C++ abstract classes and shared pointers to Rust. I used reference-counters (Rc) for multiple ownership, but I don't think I fully grasped what exactly I was doing. This shines through quite obviously with my inconsistent use of Rc and references. Plainly, I need to read more about memory management and references. Additionally, I used enums in place of abstract classes to group together similar structs which seemed like the best option at the time.

I learned a lot and got the ray tracer to work (a rust tracer if you will), so this would be one of my more successful projects to date.
image of finished render

About

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

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages