1 |
greg |
2.3 |
/* RCSid $Id$ */ |
2 |
greg |
2.1 |
/* |
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 |
rschregle |
2.2 |
Roland Schregle ([email protected]) |
11 |
|
|
(c) Fraunhofer Institute for Solar Energy Systems |
12 |
greg |
2.1 |
================================================================== |
13 |
|
|
|
14 |
greg |
2.3 |
$Id: pmapbias.h,v 2.2 2015/05/08 13:20:22 rschregle Exp $ |
15 |
greg |
2.1 |
*/ |
16 |
|
|
|
17 |
|
|
|
18 |
|
|
#ifndef PMAPBIASCOMP_H |
19 |
|
|
#define PMAPBIASCOMP_H |
20 |
|
|
|
21 |
|
|
#include "pmapdata.h" |
22 |
|
|
|
23 |
|
|
/* Bias compensation weighting function */ |
24 |
|
|
/* #define BIASCOMP_WGT(n) 1 */ |
25 |
|
|
/* #define BIASCOMP_WGT(n) (n) */ |
26 |
|
|
#define BIASCOMP_WGT(n) ((n) * (n)) |
27 |
|
|
/* #define BIASCOMP_WGT(n) ((n) * (n) * (n)) */ |
28 |
|
|
/* #define BIASCOMP_WGT(n) exp(0.003 * (n)) */ |
29 |
|
|
|
30 |
|
|
/* Dump photon bandwidth for bias compensated density estimates */ |
31 |
|
|
/* #define BIASCOMP_BWIDTH */ |
32 |
|
|
|
33 |
|
|
|
34 |
|
|
void biasComp (PhotonMap*, COLOR); |
35 |
|
|
/* Photon density estimate with bias compensation, returning irradiance. |
36 |
|
|
Expects photons in search queue after a kd-tree lookup. */ |
37 |
|
|
|
38 |
|
|
void volumeBiasComp (PhotonMap*, const RAY*, COLOR); |
39 |
|
|
/* Photon volume density estimate with bias compensation, returning |
40 |
|
|
irradiance. Expects photons in search queue after a kd-tree lookup. */ |
41 |
|
|
|
42 |
|
|
#endif |