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$ |
34 |
|
accounted for by caustic photons in the global, |
35 |
|
contrib, or dedicated caustic photon map. |
36 |
|
*/ |
37 |
< |
#define ambRayInPmap(r) ((r) -> crtype & AMBIENT && photonMapping) |
38 |
< |
|
37 |
> |
#define ambRayInPmap(r) ((r) -> crtype & AMBIENT && \ |
38 |
> |
((photonMapping && \ |
39 |
> |
(ambounce < 0 || (r) -> rlvl > 1)) || \ |
40 |
> |
causticPhotonMapping || contribPhotonMapping)) |
41 |
|
#define shadowRayInPmap(r) ((r) -> crtype & SHADOW && \ |
42 |
|
((photonMapping && ambounce < 0) || \ |
43 |
< |
(causticPhotonMapping || \ |
41 |
< |
contribPhotonMapping))) |
43 |
> |
causticPhotonMapping || contribPhotonMapping)) |
44 |
|
|
45 |
|
/* Check if scattered ray spawns a caustic photon */ |
46 |
|
#define PMAP_CAUSTICRAY(r) ((r) -> rtype & SPECULAR) |