A multithreaded software ray tracer written in Rust.
- Multithreaded rendering using rayon
- Scene loading from toml file
- Scene Deserialization
- accelerated rendering
- mesh loading
- Shadows
- Single
- Random
- Stratified
- Diffuse
- Lambertian
- Metal
- Normals
- Sphere
git clone https://github.com/edibblepdx/rayt-rs.git && cd rayt-rs/examples
#scene1.toml
[camera]
aspect_ratio = 1.777
image_width = 800
position = [0.0, 0.0, 0.0]
look_at = [0.0, 0.0, -1.0]
up = [0.0, 1.0, 0.0]
max_depth = 50
[camera.sampler]
type = "stratified"
nx = 20
ny = 20
[[primitive.sphere]]
center = [0.0, -100.5, -1.0]
radius = 100.0
material_id = 1
[[primitive.sphere]]
center = [0.0, 0.0, -1.2]
radius = 0.5
material_id = 2
[[primitive.sphere]]
center = [-1.0, 0.0, -1.0]
radius = 0.5
material_id = 3
[[primitive.sphere]]
center = [1.0, 0.0, -1.0]
radius = 0.5
material_id = 4
[[material.lambertian]]
id = 1
albedo = [0.8, 0.8, 0.0]
[[material.lambertian]]
id = 2
albedo = [0.1, 0.2, 0.5]
[[material.metal]]
id = 3
albedo = [0.8, 0.8, 0.8]
[[material.metal]]
id = 4
albedo = [0.8, 0.6, 0.2]
cargo run --release --example main > img.ppm && magick img.ppm img.jpg
This project is licensed under the MIT License.