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.
This commit is contained in:
Matthew Gordon 2022-04-26 21:09:32 -04:00
parent fb744258b2
commit 1f2924939f
1 changed files with 7 additions and 7 deletions

View File

@ -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 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)
}
//}
}