ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/ambient.c
(Generate patch)

Comparing ray/src/rt/ambient.c (file contents):
Revision 2.80 by greg, Fri Apr 25 18:38:47 2014 UTC vs.
Revision 2.81 by greg, Fri Apr 25 23:04:16 2014 UTC

# Line 391 | Line 391 | sumambient(            /* get interpolated ambient value */
391                  if (delta_r2 >= maxangle*maxangle)
392                          continue;
393                  /*
394 +                 *  Modified ray behind test
395 +                 */
396 +                VSUB(ck0, av->pos, r->rop);
397 +                d = DOT(ck0, uvw[2]);
398 +                if (d < -minarad*qambacc-.001)
399 +                        continue;
400 +                d /= av->rad[0];
401 +                delta_t2 = d*d;
402 +                if (delta_t2 >= qambacc*qambacc)
403 +                        continue;
404 +                /*
405                   *  Elliptical radii test based on Hessian
406                   */
407                  decodedir(uvw[0], av->udir);
408                  VCROSS(uvw[1], uvw[2], uvw[0]);
398                VSUB(ck0, av->pos, r->rop);
409                  d = DOT(ck0, uvw[0]) / av->rad[0];
400                delta_t2 = d*d;
401                d = DOT(ck0, uvw[1]) / av->rad[1];
410                  delta_t2 += d*d;
411 <                d = DOT(ck0, uvw[2]) / av->rad[0];
411 >                d = DOT(ck0, uvw[1]) / av->rad[1];
412                  delta_t2 += d*d;
413                  if (delta_t2 >= qambacc*qambacc)
414                          continue;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines