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

Comparing ray/src/rt/pmapamb.c (file contents):
Revision 2.1 by greg, Tue Feb 24 19:39:26 2015 UTC vs.
Revision 2.3 by greg, Wed May 27 16:23:41 2015 UTC

# Line 4 | Line 4
4  
5     Roland Schregle (roland.schregle@{hslu.ch, gmail.com})
6     (c) Fraunhofer Institute for Solar Energy Systems,
7 <       Lucerne University of Applied Sciences & Arts
7 >   (c) Lucerne University of Applied Sciences and Arts,
8 >   supported by the Swiss National Science Foundation (SNSF, #147053)
9     ==================================================================  
10    
11     $Id$
# Line 58 | Line 59 | int ambPmapCaustic (COLOR aval, RAY *r, int rdepth)
59     PhotonMap *pmap = contribPhotonMapping ? contribPmap : causticPmap;
60  
61     /* Get caustic photon density estimate only at primary rays */
62 <   if (pmap && !rdepth) {
62 >   if (pmap && (!rdepth || (!globalPmap & !contribPmap & !preCompPmap
63 >                                && r->crtype & AMBIENT))) {
64        /* Temporarily factor ambient value into ray coefficient
65         * (required for contribution photon map) */
66        copycolor(rcoef, r -> rcoef);      

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines