Study exercise in rewriting the famous Ray Tracing in One Weekend by Peter Shirley from C++ to Rust to practice the language. This is also my final project submission of the course OTUS Rust Developer.
- not looking at other numerous Rust implementations until im done with first complete implementaton
- not using 3rd party linear algebra libraries until im done with first complete implementaton
- practice writting organizing rust modules, writing tests and using CI like it was a production ready tool
Run one of the examples
cargo run --release --example final_render
- core
- vector math in 3D
- rays
- intersection with sphere
- antialiasing
- multiple bounce
- diffuse scattering
- reflection
- refraction
- scene with spheres
- adding sphere objects
- materials
- camera with arbitrary coordinate system
- infrastructure
- basic PPM image format writer
- loading bar
- custom buffer writter https://docs.rs/image/latest/image/fn.save_buffer.html
- simple CLI to control output image parameters
- scene builder config from json or yaml with
serde
- example to generate scene
json
file
- examples
- performance
- profiling with perf and flamegraph
- benches for hot paths
- parallelize the per pixel operations