From 7172bab68fa068307bf8b1dfeda958a992973763 Mon Sep 17 00:00:00 2001 From: Matthew Gordon Date: Fri, 21 Mar 2025 21:12:59 -0300 Subject: [PATCH] Fix benchmark Benchmark code had become out-of-sync with main code and wasn't compiling. --- benches/simple_scene.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/benches/simple_scene.rs b/benches/simple_scene.rs index 9b85b4c..dc44a10 100644 --- a/benches/simple_scene.rs +++ b/benches/simple_scene.rs @@ -1,6 +1,6 @@ use criterion::{criterion_group, criterion_main, Criterion}; -use vanrijn::colour::{ColourRgbF, NamedColour}; +use vanrijn::colour::{ColourRgbF, NamedColour, Spectrum}; use vanrijn::materials::ReflectiveMaterial; use vanrijn::math::Vec3; use vanrijn::mesh::load_obj; @@ -26,7 +26,9 @@ fn simple_scene(bencher: &mut Criterion) { load_obj( &model_file_path, Arc::new(ReflectiveMaterial { - colour: ColourRgbF::from_named(NamedColour::Yellow), + colour: Spectrum::reflection_from_linear_rgb(&ColourRgbF::from_named( + NamedColour::Yellow, + )), diffuse_strength: 0.05, reflection_strength: 0.9, }),