74
edits
Changes
UnknownX
,→Assignment 1 Ray Tracing
Within this trace function the possible parallelization points would be here :
{
for (unsigned i = 0; i < spheres.size(); ++i) {
float t0 = INFINITY, t1 = INFINITY;
if (spheres[i].intersect(rayorig, raydir, t0, t1)) {
if (t0 < 0) t0 = t1;
if (t0 < tnear) {
tnear = t0;
sphere = &spheres[i];
}
}
}
}
{
else {