| 17 |
|
|
| 18 |
|
#include "pmap.h" |
| 19 |
|
|
| 20 |
< |
/* |
| 20 |
> |
/* |
| 21 |
> |
ambRayInPmap(): Check for DIFFUSE -> (DIFFUSE|SPECULAR) -> * |
| 22 |
> |
subpaths. These occur during the backward pass |
| 23 |
> |
when an ambient ray spawns an indirect diffuse or |
| 24 |
> |
specular ray. These subpaths are already |
| 25 |
> |
accounted for in the global photon map. |
| 26 |
> |
*/ |
| 27 |
> |
#define ambRayInPmap(r) ((r) -> crtype & AMBIENT && photonMapping && \ |
| 28 |
> |
(ambounce < 0 || (r) -> rlvl > 1 || \ |
| 29 |
> |
causticPhotonMapping || contribPhotonMapping)) |
| 30 |
> |
|
| 31 |
> |
/* |
| 32 |
|
Check for paths already accounted for in photon map to avoid |
| 33 |
|
double-counting during backward raytracing. |
| 34 |
|
|
| 39 |
|
accounted for by caustic photons in the global, |
| 40 |
|
contrib, or dedicated caustic photon map. |
| 41 |
|
*/ |
| 31 |
– |
/* |
| 32 |
– |
#define ambRayInPmap(r) ((r) -> crtype & AMBIENT && \ |
| 33 |
– |
((photonMapping && \ |
| 34 |
– |
(ambounce < 0 || (r) -> rlvl > 1)) || \ |
| 35 |
– |
causticPhotonMapping || contribPhotonMapping)) |
| 36 |
– |
*/ |
| 37 |
– |
#define ambRayInPmap(r) 0 |
| 42 |
|
#define shadowRayInPmap(r) ((r) -> crtype & SHADOW && \ |
| 43 |
|
(ambounce < 0 || ((r) -> crtype & AMBIENT ? \ |
| 44 |
|
photonMapping : causticPhotonMapping))) |