diff options
author | sotech117 <michael_foiani@brown.edu> | 2023-12-13 01:30:52 -0500 |
---|---|---|
committer | sotech117 <michael_foiani@brown.edu> | 2023-12-13 01:30:52 -0500 |
commit | 07776876eb4638a224fd332944ce9ddca1f5a592 (patch) | |
tree | 1fbe79ac2b7dfc70d5963c7b9928e2f09910c00e /src/intersect | |
parent | c6f2be2fed772f300c0cdfe59a4a8a2733d15574 (diff) |
hardcode the camera depth to where a result is shown
Diffstat (limited to 'src/intersect')
-rw-r--r-- | src/intersect/intersect.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/intersect/intersect.cpp b/src/intersect/intersect.cpp index 353508e..69512e3 100644 --- a/src/intersect/intersect.cpp +++ b/src/intersect/intersect.cpp @@ -1,3 +1,4 @@ +#include <iostream> #include "raytracer/raytracer.h" /** @@ -28,6 +29,7 @@ glm::vec4 intersectCircle( return glm::vec4(0.f); } + float t1 = (-b - std::sqrt(discriminant)) / (2.f*a); float t2 = (-b + std::sqrt(discriminant)) / (2.f*a); if (t1 <= 0 && t2 <= 0) // both behind camera |