From 1f2924939f102970668f19733f2b4f80a16b34d5 Mon Sep 17 00:00:00 2001 From: Matthew Gordon Date: Tue, 26 Apr 2022 21:09:32 -0400 Subject: [PATCH] Remove sun from test lighting environment Because multiple importance sampling is not implemented yet, convergence is quite slow and the single bright light source of the sun causes the image to be extremely noisy. --- src/integrators/simple_random_integrator.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/integrators/simple_random_integrator.rs b/src/integrators/simple_random_integrator.rs index 4e65fba..26639b5 100644 --- a/src/integrators/simple_random_integrator.rs +++ b/src/integrators/simple_random_integrator.rs @@ -55,11 +55,11 @@ impl Integrator for SimpleRandomIntegrator { } pub fn test_lighting_environment(w_o: &Vec3, wavelength: f64) -> f64 { - let sun_direction = Vec3::new(1.0, 1.0, -1.0).normalize(); - if w_o.dot(&sun_direction) >= 0.99 { - 300.0 - } else { - let sky_colour = ColourRgbF::new(w_o.y(), w_o.y(), 1.0); - Spectrum::reflection_from_linear_rgb(&sky_colour).intensity_at_wavelength(wavelength) - } + //let sun_direction = Vec3::new(1.0, 1.0, -1.0).normalize(); + //if w_o.dot(&sun_direction) >= 0.99 { + // 300.0 + //} else { + let sky_colour = ColourRgbF::new(w_o.y(), w_o.y(), 1.0); + Spectrum::reflection_from_linear_rgb(&sky_colour).intensity_at_wavelength(wavelength) + //} }