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.79 by greg, Fri Apr 25 00:21:52 2014 UTC vs.
Revision 2.80 by greg, Fri Apr 25 18:38:47 2014 UTC

# Line 357 | Line 357 | sumambient(            /* get interpolated ambient value */
357          FVECT  c0,
358          double  s
359   )
360 < {                       /* initial limit is 5 degrees plus ambacc radians */
361 <        const double    minangle = 5.0 * PI/180.;
360 > {                       /* initial limit is 10 degrees plus ambacc radians */
361 >        const double    minangle = 10.0 * PI/180.;
362          const double    maxangle = (minangle+ambacc-PI/2.)*pow(r->rweight,0.13)
363                                          + PI/2.;
364          double          wsum = 0.0;
# Line 400 | Line 400 | sumambient(            /* get interpolated ambient value */
400                  delta_t2 = d*d;
401                  d = DOT(ck0, uvw[1]) / av->rad[1];
402                  delta_t2 += d*d;
403 +                d = DOT(ck0, uvw[2]) / av->rad[0];
404 +                delta_t2 += d*d;
405                  if (delta_t2 >= qambacc*qambacc)
404                        continue;
405                /*
406                 *  Intersection behind test
407                 */
408                d = 0.0;
409                for (j = 0; j < 3; j++)
410                        d += (r->rop[j] - av->pos[j])*(uvw[2][j] + r->ron[j]);
411                if (d*0.5 < -minarad*qambacc-.001)
406                          continue;
407                  /*
408                   *  Extrapolate value and compute final weight (hat function)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines