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:
parent
fb744258b2
commit
1f2924939f
|
|
@ -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)
|
||||
//}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue