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.35 by greg, Tue Nov 21 14:28:22 1995 UTC vs.
Revision 2.36 by greg, Wed Feb 14 15:43:22 1996 UTC

# Line 21 | Line 21 | static char SCCSid[] = "$SunId$ LBL";
21   #ifndef  OCTSCALE
22   #define  OCTSCALE       1.0     /* ceil((valid rad.)/(cube size)) */
23   #endif
24 #ifndef  AMBVWT
25 #define  AMBVWT         250     /* relative ambient value weight (# calcs) */
26 #endif
24  
25   typedef struct ambtree {
26          AMBVAL  *alist;         /* ambient value list */
# Line 222 | Line 219 | FVECT  nrm;
219                  return;
220   dumbamb:                                        /* return global value */
221          copycolor(acol, ambval);
222 < #if  AMBVWT
226 <        if (nambvals == 0)
222 >        if (ambvwt <= 0 | nambvals == 0)
223                  return;
224 <        scalecolor(acol, (double)AMBVWT);
224 >        scalecolor(acol, (double)ambvwt);
225          addcolor(acol, avsum);                  /* average in computations */
226 <        d = 1.0/(AMBVWT+nambvals);
226 >        d = 1.0/(ambvwt+nambvals);
227          scalecolor(acol, d);
232 #endif
228   }
229  
230  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines