A simple raytracer based on the Ray Tracing in One Weekend
and Ray Tracing: The Next Week
by Peter Shirley, written in Rust. The raytracer uses theimage
crate to generate the image from a buffer
and rayon
to add parallelization.
You can run the project by using cargo. It's highly recommended building a release target:
cargo run --release
I've modified the rendering procedure to save the currently rendering image each time there's a new frame available.
These frames are generated each time one ray has been traced for all available pixels in the image and will progressively
create a final image for the number of samples per pixel that is specified in the main.ru
file.
You can view the generating image by using e.g. sxiv
:
sxiv output.png