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.72 by greg, Fri Apr 11 22:54:34 2014 UTC vs.
Revision 2.73 by greg, Wed Apr 16 20:32:00 2014 UTC

# Line 320 | Line 320 | multambient(           /* compute ambient component & multiply
320          ok = makeambient(acol, r, nrm, rdepth-1);
321          rdepth--;
322          if (ok) {
323 <                multcolor(aval, acol);          /* got new value */
323 >                multcolor(aval, acol);          /* computed new value */
324                  return;
325          }
326   dumbamb:                                        /* return global value */
# Line 454 | Line 454 | makeambient(           /* make a new ambient value for storage
454                  amb.weight = 1.25*r->rweight;
455          setcolor(acol, AVGREFL, AVGREFL, AVGREFL);
456                                                  /* compute ambient */
457 <        if (!doambient(acol, r, amb.weight, uvw, amb.rad, amb.gpos, amb.gdir)) {
458 <                setcolor(acol, 0.0, 0.0, 0.0);
459 <                return(0);
460 <        }
457 >        i = doambient(acol, r, amb.weight, uvw, amb.rad, amb.gpos, amb.gdir);
458          scalecolor(acol, 1./AVGREFL);           /* undo assumed reflectance */
459 +        if (i <= 0)                             /* no Hessian => no storage */
460 +                return(i);
461                                                  /* store value */
462          VCOPY(amb.pos, r->rop);
463          amb.ndir = encodedir(r->ron);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines