| 1 |
/* RCSid $Id: pmapbias.h,v 2.3 2015/08/18 18:45:55 greg Exp $ */ |
| 2 |
|
| 3 |
/* |
| 4 |
================================================================== |
| 5 |
Bias compensation for photon density estimates |
| 6 |
|
| 7 |
For background see: |
| 8 |
R. Schregle, "Bias Compensation for Photon Maps", |
| 9 |
Computer Graphics Forum, v22:n4, pp. 729-742, Dec. 2003. |
| 10 |
|
| 11 |
Roland Schregle ([email protected]) |
| 12 |
(c) Fraunhofer Institute for Solar Energy Systems |
| 13 |
================================================================== |
| 14 |
|
| 15 |
$Id: pmapbias.h,v 2.2 2015/05/08 13:20:22 rschregle Exp $ |
| 16 |
*/ |
| 17 |
|
| 18 |
|
| 19 |
#ifndef PMAPBIASCOMP_H |
| 20 |
#define PMAPBIASCOMP_H |
| 21 |
|
| 22 |
#include "pmapdata.h" |
| 23 |
|
| 24 |
/* Bias compensation weighting function */ |
| 25 |
/* #define BIASCOMP_WGT(n) 1 */ |
| 26 |
/* #define BIASCOMP_WGT(n) (n) */ |
| 27 |
#define BIASCOMP_WGT(n) ((n) * (n)) |
| 28 |
/* #define BIASCOMP_WGT(n) ((n) * (n) * (n)) */ |
| 29 |
/* #define BIASCOMP_WGT(n) exp(0.003 * (n)) */ |
| 30 |
|
| 31 |
/* Dump photon bandwidth for bias compensated density estimates */ |
| 32 |
/* #define BIASCOMP_BWIDTH */ |
| 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 |