ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/ambcomp.c
(Generate patch)

Comparing ray/src/rt/ambcomp.c (file contents):
Revision 1.6 by greg, Thu Jun 13 10:54:00 1991 UTC vs.
Revision 1.7 by greg, Thu Jun 13 12:00:29 1991 UTC

# Line 213 | Line 213 | FVECT  pg, dg;
213          else if (arad < minarad)
214                  arad = minarad;
215          arad /= sqrt(r->rweight);
216 +        if (pg != NULL) {               /* clip pos. gradient if too large */
217 +                d = 4.0*DOT(pg,pg)*arad*arad;
218 +                if (d > 1.0) {
219 +                        d = 1.0/sqrt(d);
220 +                        for (i = 0; i < 3; i++)
221 +                                pg[i] *= d;
222 +                }
223 +        }
224          return(arad);
225   oopsy:
226          if (div != NULL)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines