"Ray Tracing in One Weekend (Amazon)" implemented in Rust 2018
This is the new branch implemented in Rust 2018. For previous version, refer to legacy branch.
Write your specifications in
use self::renderer::utils::render_high_quality as render; use self::scenes::simple_scene::simple_scene_perlin_noise as scene;
Here you can change
render_preview to render faster. And you can select from examples scenes by changing
render(hitable_list, camera, "scene.png", true)?;
The third parameter indicates that with previous rendering settings, the image will be rendered to
The fourth parameter indicates whether to enable ambient light or not.
cargo run --release
The scene from the cover of "Ray Tracing in One Weekend". It takes ~450 secs to render.
Generate 300 spheres (no overlap) in the space with different materials and settings.
It takes ~560 secs to render.
Run Tests and Benchmarks
cargo bench cargo test