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.116 by greg, Fri Jan 27 19:57:08 2023 UTC vs.
Revision 2.117 by greg, Sat Jan 28 19:08:56 2023 UTC

# Line 46 | Line 46 | static long  lastpos = -1;             /* last flush position */
46  
47   #define  newambval()    (AMBVAL *)malloc(sizeof(AMBVAL))
48  
49 < #define  tfunc(lwr, x, upr)     (((x)-(lwr))/((upr)-(lwr)))
49 > #define  tfunc(x0, x, x1)       (((x)-(x0))/((x1)-(x0)))
50  
51   static void initambfile(int creat);
52   static void avsave(AMBVAL *av);
# Line 424 | Line 424 | sumambient(            /* get interpolated ambient value */
424                                                          at->kid+i, ck0, s);
425                  }
426                                          /* good enough? */
427 <                if (wsum >= 0.05 && s > minarad*10.0)
427 >                if ((wsum >= 0.05) & (s*ambacc > minarad))
428                          return(wsum);
429          }
430                                          /* adjust maximum angle */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines