From 07776876eb4638a224fd332944ce9ddca1f5a592 Mon Sep 17 00:00:00 2001 From: sotech117 Date: Wed, 13 Dec 2023 01:30:52 -0500 Subject: hardcode the camera depth to where a result is shown --- src/intersect/intersect.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/intersect/intersect.cpp') 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 #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 -- cgit v1.2.3-70-g09d2