riley-harper / RayTracer

Code for a raytracer that I built in spring 2021, along with example images!
0 stars 0 forks source link

Sorting Algorithm for BVH Construction Has Bad Initial `min_value` #52

Open riley-harper opened 3 years ago

riley-harper commented 3 years ago

Right now min_value is set to 1000 before the loop starts. It's immediately overwritten correctly. Since we can assume that there's at least 1 primitive in the primitives list, we could make this a lot less confusing by setting it to bounds.at(0).XMin().