Closer to correct shading, but still not there.

This commit is contained in:
Bill Thiede 2018-09-08 23:13:11 -07:00
parent 15fe1e632c
commit 35722b57b1

View File

@ -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 {