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.109 by greg, Tue Mar 10 15:57:52 2020 UTC vs.
Revision 2.110 by greg, Fri Feb 19 22:05:46 2021 UTC

# Line 583 | Line 583 | extambient(            /* extrapolate value at pv, nv */
583   )
584   {
585          const double    min_d = 0.05;
586 +        const double    max_d = 20.;
587          static FVECT    my_uvw[3];
588          FVECT           v1;
589          int             i;
# Line 602 | Line 603 | extambient(            /* extrapolate value at pv, nv */
603          for (i = 3; i--; )
604                  d += v1[i] * (ap->gdir[0]*uvw[0][i] + ap->gdir[1]*uvw[1][i]);
605          
606 <        if (d < min_d)                  /* should not use if we can avoid it */
606 >        if (d < min_d)                  /* clamp min/max scaling */
607                  d = min_d;
608 +        else if (d > max_d)
609 +                d = max_d;
610          copycolor(cr, ap->val);
611          scalecolor(cr, d);
612          return(d > min_d);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines