1 |
+ |
#ifndef lint |
2 |
+ |
static const char RCSid[] = "$Id$"; |
3 |
+ |
#endif |
4 |
|
/* |
5 |
|
================================================================== |
6 |
|
Photon map interface to RADIANCE ambient calculation |
11 |
|
supported by the Swiss National Science Foundation (SNSF, #147053) |
12 |
|
================================================================== |
13 |
|
|
11 |
– |
$Id$ |
14 |
|
*/ |
15 |
|
|
16 |
|
|
60 |
|
/* Handle precedence in case of multiple photon maps: contrib > caustic */ |
61 |
|
PhotonMap *pmap = contribPhotonMapping ? contribPmap : causticPmap; |
62 |
|
|
63 |
< |
/* Get caustic photon density estimate only at primary rays */ |
64 |
< |
if (pmap && (!rdepth || (!globalPmap & !contribPmap & !preCompPmap |
65 |
< |
&& r->crtype & AMBIENT))) { |
63 |
> |
/* Get caustic photon density estimate at primary rays or when |
64 |
> |
* filling in ambient rays that have no global photon map to use */ |
65 |
> |
if (pmap && (!rdepth || !globalPmap & !contribPmap & !preCompPmap)) { |
66 |
|
/* Temporarily factor ambient value into ray coefficient |
67 |
|
* (required for contribution photon map) */ |
68 |
|
copycolor(rcoef, r -> rcoef); |