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.58 by greg, Tue Apr 19 01:15:06 2005 UTC vs.
Revision 2.59 by greg, Wed May 25 18:06:22 2005 UTC

# Line 289 | Line 289 | multambient(           /* compute ambient component & multiply
289                  sortambvals(0);
290                                                  /* get ambient value */
291          setcolor(acol, 0.0, 0.0, 0.0);
292 <        d = sumambient(acol, r, nrm, rdepth,
292 >        d = sumambient(acol, r, intens(aval)*r->rweight, nrm, rdepth,
293                          &atrunk, thescene.cuorg, thescene.cusize);
294          if (d > FTINY) {
295                  scalecolor(acol, 1.0/d);
# Line 326 | Line 326 | extern double
326   sumambient(     /* get interpolated ambient value */
327          COLOR  acol,
328          register RAY  *r,
329 +        double  rw,
330          FVECT  rn,
331          int  al,
332          AMBTREE  *at,
# Line 351 | Line 352 | sumambient(    /* get interpolated ambient value */
352                   */
353                  if (av->lvl > al)       /* list sorted, so this works */
354                          break;
355 <                if (av->weight < r->rweight-FTINY)
355 >                if (av->weight < 0.9*rw)
356                          continue;
357                  /*
358                   *  Ambient radius test.
# Line 430 | Line 431 | sumambient(    /* get interpolated ambient value */
431                                  break;
432                  }
433                  if (j == 3)
434 <                        wsum += sumambient(acol, r, rn, al, at->kid+i, ck0, s);
434 >                        wsum += sumambient(acol, r, rw, rn, al,
435 >                                                at->kid+i, ck0, s);
436          }
437          return(wsum);
438   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines