From e419994fae6196d84eadb46f37cdc3166319299a Mon Sep 17 00:00:00 2001 From: Bill Thiede Date: Wed, 21 Jul 2021 14:51:51 -0700 Subject: [PATCH] eoc9: add third light now that the we don't normalize it --- rtchallenge/examples/eoc9.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/rtchallenge/examples/eoc9.rs b/rtchallenge/examples/eoc9.rs index 192cf86..553c07e 100644 --- a/rtchallenge/examples/eoc9.rs +++ b/rtchallenge/examples/eoc9.rs @@ -38,8 +38,11 @@ fn main() -> Result<()> { let light_color = WHITE; let light1 = PointLight::new(light_position, light_color); let light_position = Tuple::point(10., 10., -10.); - let light_color = Color::new(0.6, 0.6, 0.6); + let light_color = Color::new(0.2, 0.2, 0.6); let light2 = PointLight::new(light_position, light_color); + let light_position = Tuple::point(0., 2., -10.); + let light_color = Color::new(0.2, 0.2, 0.1); + let light3 = PointLight::new(light_position, light_color); let mut camera = Camera::new(width, height, PI / 4.); let from = Tuple::point(0., 1.5, -5.); @@ -86,7 +89,7 @@ fn main() -> Result<()> { }; let mut world = World::default(); - world.lights = vec![light1, light2]; + world.lights = vec![light1, light2, light3]; world.objects = vec![floor, middle, right, left]; let image = camera.render(&world);