| 1 |
greg |
2.1 |
/*
|
| 2 |
|
|
==================================================================
|
| 3 |
|
|
Bias compensation for photon density estimates
|
| 4 |
|
|
|
| 5 |
|
|
For background see:
|
| 6 |
|
|
R. Schregle, "Bias Compensation for Photon Maps",
|
| 7 |
|
|
Computer Graphics Forum, v22:n4, pp. 729-742, Dec. 2003.
|
| 8 |
|
|
|
| 9 |
rschregle |
2.2 |
Roland Schregle ([email protected])
|
| 10 |
|
|
(c) Fraunhofer Institute for Solar Energy Systems
|
| 11 |
greg |
2.1 |
==================================================================
|
| 12 |
|
|
|
| 13 |
rschregle |
2.2 |
$Id: pmapbias.h,v 2.1 2015/02/24 19:39:26 greg Exp $
|
| 14 |
greg |
2.1 |
*/
|
| 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
|