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

Comparing ray/src/rt/pmutil.c (file contents):
Revision 2.4 by rschregle, Thu Jan 23 18:27:02 2020 UTC vs.
Revision 2.5 by rschregle, Wed Apr 8 15:14:21 2020 UTC

# Line 203 | Line 203 | void photonPreCompDensity (PhotonMap *pmap, RAY *r, CO
203     if (r -> ro && islight(objptr(r -> ro -> omod) -> otype))
204        return;
205        
206 <   find1Photon(preCompPmap, r, &p);
207 <   getPhotonFlux(&p, irrad);
206 >   if (find1Photon(preCompPmap, r, &p))
207 >      /* p contains a found photon, so get its irradiance, otherwise it
208 >       * remains zero under the assumption all photons are too distant
209 >       * to contribute significantly */
210 >      getPhotonFlux(&p, irrad);
211   }
212  
213  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines