Closer to correct shading, but still not there.
This commit is contained in:
parent
15fe1e632c
commit
35722b57b1
@ -13,7 +13,7 @@ fn hit_sphere(center: Vec3, radius: f32, r: Ray) -> f32 {
|
|||||||
if discriminant < 0. {
|
if discriminant < 0. {
|
||||||
return -1.;
|
return -1.;
|
||||||
}
|
}
|
||||||
-b - discriminant.sqrt() / (2. * a)
|
(-b - discriminant.sqrt()) / (2. * a)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn color(r: Ray) -> Vec3 {
|
fn color(r: Ray) -> Vec3 {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user