novalain / gi-ray

A Monte-Carlo ray tracer from scratch in C++
5 stars 1 forks source link

Cleanup the sphere intersection function #95

Closed Carlbaum closed 8 years ago

Carlbaum commented 8 years ago

if (t0 < 0) { t0 = t1; } if (t0 < 0) { return nullptr; }

if t0 is actually less than 0 we check it twice.. should probably be something like: if (t0 < 0) { if (t1 < 0) { return nullptr; } t0 = t1; }

novalain commented 8 years ago

Yeeee this is a mess. Compare and maybe go back to the old sphere intersection method