1 |
+ |
#ifndef lint |
2 |
+ |
static const char RCSid[] = "$Id$"; |
3 |
+ |
#endif |
4 |
|
/* |
5 |
|
================================================================== |
6 |
|
Photon map interface to RADIANCE ambient calculation |
7 |
|
|
8 |
|
Roland Schregle (roland.schregle@{hslu.ch, gmail.com}) |
9 |
|
(c) Fraunhofer Institute for Solar Energy Systems, |
10 |
< |
Lucerne University of Applied Sciences & Arts |
10 |
> |
(c) Lucerne University of Applied Sciences and Arts, |
11 |
> |
supported by the Swiss National Science Foundation (SNSF, #147053) |
12 |
|
================================================================== |
13 |
|
|
14 |
|
$Id$ |
61 |
|
/* Handle precedence in case of multiple photon maps: contrib > caustic */ |
62 |
|
PhotonMap *pmap = contribPhotonMapping ? contribPmap : causticPmap; |
63 |
|
|
64 |
< |
/* Get caustic photon density estimate only at primary rays */ |
65 |
< |
if (pmap && !rdepth) { |
64 |
> |
/* Get caustic photon density estimate at primary rays or when |
65 |
> |
* filling in ambient rays that have no global photon map to use */ |
66 |
> |
if (pmap && (!rdepth || !globalPmap & !contribPmap & !preCompPmap)) { |
67 |
|
/* Temporarily factor ambient value into ray coefficient |
68 |
|
* (required for contribution photon map) */ |
69 |
|
copycolor(rcoef, r -> rcoef); |