From 6f88f9fe6d8c1d2a7f15e6a325571518dccf147d Mon Sep 17 00:00:00 2001 From: Michael Zhang Date: Wed, 15 Feb 2023 01:39:20 -0600 Subject: [PATCH] Fix light direction --- assignment-1b/src/scene/illumination.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assignment-1b/src/scene/illumination.rs b/assignment-1b/src/scene/illumination.rs index 8f1786c..250a5eb 100644 --- a/assignment-1b/src/scene/illumination.rs +++ b/assignment-1b/src/scene/illumination.rs @@ -61,7 +61,7 @@ impl Scene { LightKind::Point { location } => { location - intersection_context.point } - LightKind::Directional { direction } => direction, + LightKind::Directional { direction } => -direction, } .normalize();