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

Comparing ray/src/rt/pmapdata.c (file contents):
Revision 2.19 by rschregle, Tue Mar 20 19:55:33 2018 UTC vs.
Revision 2.20 by rschregle, Fri Mar 8 17:25:17 2019 UTC

# Line 214 | Line 214 | int newPhoton (PhotonMap* pmap, const RAY* ray)
214     if (ray -> robj > -1 && islight(objptr(ray -> ro -> omod) -> otype))
215        return -1;
216  
217 <   /*  if modifier in include/exclude set */
217 >   /* Ignore photon if modifier in/outside exclude/include set */
218     if (ambincl != -1 && ray -> ro &&
219         ambincl != inset(ambset, ray -> ro -> omod))
220        return -1;
# Line 233 | Line 233 | int newPhoton (PhotonMap* pmap, const RAY* ray)
233        if (!inROI)
234           return -1;
235     }
236 <    
236 >  
237     /* Adjust flux according to distribution ratio and ray weight */
238     copycolor(photonFlux, ray -> rcol);  
239     scalecolor(photonFlux,
240                ray -> rweight / (pmap -> distribRatio ? pmap -> distribRatio
241                                                       : 1));
242     setPhotonFlux(&photon, photonFlux);
243 <            
243 >
244     /* Set photon position and flags */
245     VCOPY(photon.pos, ray -> rop);
246     photon.flags = 0;
# Line 383 | Line 383 | void buildPhotonMap (PhotonMap *pmap, double *photonFl
383           /* Scale photon's flux (hitherto normalised to 1 over RGB); in
384            * case of a contrib photon map, this is done per light source,
385            * and photonFlux is assumed to be an array */
386 <         getPhotonFlux(p, flux);            
386 >         getPhotonFlux(p, flux);
387  
388           if (photonFlux) {
389              scalecolor(flux, photonFlux [isContribPmap(pmap) ?

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines