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.92 by greg, Fri Nov 21 00:30:11 2014 UTC vs.
Revision 2.93 by greg, Fri Nov 21 00:53:52 2014 UTC

# Line 547 | Line 547 | extambient(            /* extrapolate value at pv, nv */
547          FVECT  uvw[3]
548   )
549   {
550 +        const double    min_d = 0.05;
551          static FVECT    my_uvw[3];
552          FVECT           v1;
553          int             i;
# Line 566 | Line 567 | extambient(            /* extrapolate value at pv, nv */
567          for (i = 3; i--; )
568                  d += v1[i] * (ap->gdir[0]*uvw[0][i] + ap->gdir[1]*uvw[1][i]);
569          
570 <        if (d <= 0.0) {
571 <                setcolor(cr, 0.0, 0.0, 0.0);
571 <                return(0);              /* should not use if we can avoid it */
572 <        }
570 >        if (d < min_d)                  /* should not use if we can avoid it */
571 >                d = min_d;
572          copycolor(cr, ap->val);
573          scalecolor(cr, d);
574 <        return(1);
574 >        return(d > min_d);
575   }
576  
577  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines