| 12 |
|
#include "rtotypes.h" |
| 13 |
|
#include "source.h" |
| 14 |
|
#include "random.h" |
| 15 |
– |
#include "pmap.h" |
| 15 |
|
#include "pmapsrc.h" |
| 16 |
+ |
#include "pmapmat.h" |
| 17 |
|
|
| 18 |
|
#ifndef MAXSSAMP |
| 19 |
|
#define MAXSSAMP 16 /* maximum samples per ray */ |
| 683 |
|
* The same is true for stray specular samples, since the specular |
| 684 |
|
* contribution from light sources is calculated separately. |
| 685 |
|
*/ |
| 686 |
< |
|
| 687 |
< |
#define badcomponent(m, r) (r->crtype&(AMBIENT|SPECULAR) && \ |
| 686 |
> |
/* PMAP: Also avoid counting sources via transferred ambient rays (e.g. |
| 687 |
> |
* through glass) when photon mapping is enabled, as these indirect |
| 688 |
> |
* components are already accounted for. |
| 689 |
> |
*/ |
| 690 |
> |
#define badcomponent(m, r) (srcRayInPmap(r) || \ |
| 691 |
> |
(r->crtype&(AMBIENT|SPECULAR) && \ |
| 692 |
|
!(r->crtype&SHADOW || r->rod < 0.0 || \ |
| 693 |
< |
/* not 100% correct */ distglow(m, r, r->rot))) |
| 693 |
> |
/* not 100% correct */ distglow(m, r, r->rot)))) |
| 694 |
|
|
| 695 |
|
/* passillum * |
| 696 |
|
* |