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