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.66 by greg, Tue Feb 24 19:39:27 2015 UTC vs.
Revision 2.69 by greg, Tue May 26 15:58:35 2015 UTC

# Line 107 | Line 107 | rayorigin(             /* start new ray from old one */
107                  return(-1);
108          if (r->crtype & SHADOW)                 /* shadow commitment */
109                  return(0);
110 +                                                /* ambient in photon map? */
111 +        if (ro != NULL && ro->crtype & AMBIENT) {
112 +                if (causticPhotonMapping)
113 +                        return(-1);
114 +                if (photonMapping && rt != TRANS)
115 +                        return(-1);
116 +        }
117          if (maxdepth <= 0 && rc != NULL) {      /* Russian roulette */
118                  if (minweight <= 0.0)
119                          error(USER, "zero ray weight in Russian roulette");
# Line 182 | Line 189 | raytrans(                      /* transmit ray as is */
189   {
190          RAY  tr;
191  
192 <        if (rayorigin(&tr, TRANS, r, NULL) == 0) {
193 <                VCOPY(tr.rdir, r->rdir);
194 <                rayvalue(&tr);
195 <                copycolor(r->rcol, tr.rcol);
196 <                r->rt = r->rot + tr.rt;
190 <        }
192 >        rayorigin(&tr, TRANS, r, NULL);         /* always continue */
193 >        VCOPY(tr.rdir, r->rdir);
194 >        rayvalue(&tr);
195 >        copycolor(r->rcol, tr.rcol);
196 >        r->rt = r->rot + tr.rt;
197   }
198  
199  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines