1 |
/* RCSid $Id: pmapbias.h,v 2.3 2015/08/18 18:45:55 greg Exp $ */ |
2 |
/* |
3 |
================================================================== |
4 |
Bias compensation for photon density estimates |
5 |
|
6 |
For background see: |
7 |
R. Schregle, "Bias Compensation for Photon Maps", |
8 |
Computer Graphics Forum, v22:n4, pp. 729-742, Dec. 2003. |
9 |
|
10 |
Roland Schregle ([email protected]) |
11 |
(c) Fraunhofer Institute for Solar Energy Systems |
12 |
================================================================== |
13 |
|
14 |
*/ |
15 |
|
16 |
|
17 |
#ifndef PMAPBIASCOMP_H |
18 |
#define PMAPBIASCOMP_H |
19 |
|
20 |
#include "pmapdata.h" |
21 |
|
22 |
/* Bias compensation weighting function */ |
23 |
/* #define BIASCOMP_WGT(n) 1 */ |
24 |
/* #define BIASCOMP_WGT(n) (n) */ |
25 |
#define BIASCOMP_WGT(n) ((n) * (n)) |
26 |
/* #define BIASCOMP_WGT(n) ((n) * (n) * (n)) */ |
27 |
/* #define BIASCOMP_WGT(n) exp(0.003 * (n)) */ |
28 |
|
29 |
/* Dump photon bandwidth for bias compensated density estimates */ |
30 |
/* #define BIASCOMP_BWIDTH */ |
31 |
|
32 |
|
33 |
void biasComp (PhotonMap*, COLOR); |
34 |
/* Photon density estimate with bias compensation, returning irradiance. |
35 |
Expects photons in search queue after a kd-tree lookup. */ |
36 |
|
37 |
void volumeBiasComp (PhotonMap*, const RAY*, COLOR); |
38 |
/* Photon volume density estimate with bias compensation, returning |
39 |
irradiance. Expects photons in search queue after a kd-tree lookup. */ |
40 |
|
41 |
#endif |