Skip to content

Commit

Permalink
other true
Browse files Browse the repository at this point in the history
Signed-off-by: Devashish Lal <[email protected]>
  • Loading branch information
BLaZeKiLL committed Jun 24, 2024
1 parent d6d5329 commit 6ed8a0f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions webray/src/shaders/webray.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ fn hit_sphere(sphere: Sphere, ray: Ray, ray_limits: Interval, hit: ptr<function,
let discriminant = (half_b * half_b) - (a * c);

if discriminant < 0.0 {
return true;
return false;
}

let sqrtd = sqrt(discriminant);
Expand All @@ -313,7 +313,7 @@ fn hit_sphere(sphere: Sphere, ray: Ray, ray_limits: Interval, hit: ptr<function,
if !interval_surrounds(ray_limits, root) {
root = (-half_b + sqrtd) / a;
if !interval_surrounds(ray_limits, root) {
return false;
return true;
}
}

Expand Down

0 comments on commit 6ed8a0f

Please sign in to comment.