| 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$ |
| 58 |
|
/* Handle precedence in case of multiple photon maps: contrib > caustic */ |
| 59 |
|
PhotonMap *pmap = contribPhotonMapping ? contribPmap : causticPmap; |
| 60 |
|
|
| 61 |
< |
/* Get caustic photon density estimate only at primary rays */ |
| 62 |
< |
if (pmap && !rdepth) { |
| 61 |
> |
/* Get caustic photon density estimate at primary rays or when |
| 62 |
> |
* filling in ambient rays that have no global photon map to use */ |
| 63 |
> |
if (pmap && (!rdepth || !globalPmap & !contribPmap & !preCompPmap)) { |
| 64 |
|
/* Temporarily factor ambient value into ray coefficient |
| 65 |
|
* (required for contribution photon map) */ |
| 66 |
|
copycolor(rcoef, r -> rcoef); |