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

Comparing ray/src/rt/raytrace.c (file contents):
Revision 2.67 by greg, Thu May 21 15:28:24 2015 UTC vs.
Revision 2.70 by greg, Thu Mar 17 21:53:42 2016 UTC

# Line 51 | Line 51 | rayorigin(             /* start new ray from old one */
51                  setcolor(r->rcoef, 1., 1., 1.);
52          } else {
53                  rw = intens(rc);
54 +                if (rw > 1.0)
55 +                        rw = 1.0;               /* avoid calculation growth */
56                  if (rc != r->rcoef)
57                          copycolor(r->rcoef, rc);
58          }
# Line 108 | Line 110 | rayorigin(             /* start new ray from old one */
110          if (r->crtype & SHADOW)                 /* shadow commitment */
111                  return(0);
112                                                  /* ambient in photon map? */
113 <        if (r->crtype & AMBIENT && photonMapping)
114 <                return(-1);
113 >        if (ro != NULL && ro->crtype & AMBIENT) {
114 >                if (causticPhotonMapping)
115 >                        return(-1);
116 >                if (photonMapping && rt != TRANS)
117 >                        return(-1);
118 >        }
119          if (maxdepth <= 0 && rc != NULL) {      /* Russian roulette */
120                  if (minweight <= 0.0)
121                          error(USER, "zero ray weight in Russian roulette");

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines