Fix nans for iridescent material
This commit is contained in:
parent
c26a4bece0
commit
e3009563ba
3 changed files with 42 additions and 10 deletions
|
|
@ -28,7 +28,7 @@ pub fn example_scenes<R: Rng + Debug + 'static>() -> HashMap<&'static str, Box<d
|
|||
"stanford_dragon_microfacet",
|
||||
Box::new(stanford_dragon::StanfordDragon::new(material)),
|
||||
);
|
||||
let material = Iridescent::new(300.0, 300.0, 1.0, 1.5, 10);
|
||||
let material = Iridescent::new(100.0, 900.0, 1.0, 1.5, 20);
|
||||
map.insert(
|
||||
"stanford_dragon_iridescent",
|
||||
Box::new(stanford_dragon::StanfordDragon::new(material)),
|
||||
|
|
|
|||
|
|
@ -40,8 +40,8 @@ impl<R: Rng + 'static, M: Material<R> + 'static> ExampleScene<R> for StanfordDra
|
|||
let materials = vec![
|
||||
BVHMaterial::new_material(self.material.take().unwrap()),
|
||||
BVHMaterial::new_material(OrenNayar::new(0.5, Color::new(0.8, 0.8, 0.8))),
|
||||
BVHMaterial::new_material(OrenNayar::new(0.5, Color::new(0.9, 0.0, 0.0))),
|
||||
BVHMaterial::new_material(OrenNayar::new(0.5, Color::new(0.0, 0.9, 0.0))),
|
||||
BVHMaterial::new_material(OrenNayar::new(0.5, Color::new(0.9, 0.2, 0.2))),
|
||||
BVHMaterial::new_material(OrenNayar::new(0.5, Color::new(0.2, 0.9, 0.2))),
|
||||
BVHMaterial::new_light(AreaLight::new(Color::white() * 30.0)),
|
||||
];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue