specular reflections appear to be working

This commit is contained in:
CDaut 2023-12-01 11:31:40 +01:00
parent 1a355f81ca
commit b2e5d7ed47
11 changed files with 71 additions and 27 deletions

View file

@ -38,7 +38,7 @@ pub struct Args {
debug: bool,
///path tracing recursion depth
#[arg(long)]
recurse: usize
recurse: usize,
}
fn main() {
@ -52,8 +52,8 @@ fn main() {
println!("Path tracing image. Columns finished:");
let mut radiosity_buffer: Vec<Vec<Vector4<f32>>> = match render(scenes, &args).lock() {
Ok(buffer) => {buffer.to_vec()}
Err(_) => {panic!("Unable to lock radiosity buffer!")}
Ok(buffer) => { buffer.to_vec() }
Err(_) => { panic!("Unable to lock radiosity buffer!") }
};
//normalize radiosity values globally
@ -66,6 +66,8 @@ fn main() {
let output_image =
store_colors_to_image(as_colors);
output_image.save("/home/clemens/repositorys/raytrace-rs/output_image.png").expect("Unable to save image!");
output_image
.save("/home/clemens/repositorys/raytrace-rs/output_image.png")
.expect("Unable to save image!");
}