From 35722b57b1aa63aa3361a9095965adb1d0c0d6b8 Mon Sep 17 00:00:00 2001 From: Bill Thiede Date: Sat, 8 Sep 2018 23:13:11 -0700 Subject: [PATCH] Closer to correct shading, but still not there. --- rtiow/src/bin/tracer_norm_shade.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtiow/src/bin/tracer_norm_shade.rs b/rtiow/src/bin/tracer_norm_shade.rs index 7f65e77..88a6484 100644 --- a/rtiow/src/bin/tracer_norm_shade.rs +++ b/rtiow/src/bin/tracer_norm_shade.rs @@ -13,7 +13,7 @@ fn hit_sphere(center: Vec3, radius: f32, r: Ray) -> f32 { if discriminant < 0. { return -1.; } - -b - discriminant.sqrt() / (2. * a) + (-b - discriminant.sqrt()) / (2. * a) } fn color(r: Ray) -> Vec3 {