Open main menu

CDOT Wiki β

Changes

UnknownX

320 bytes added, 14:59, 13 March 2017
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 {
74
edits