src/slg/engines/caches/photongi/photongicache.cpp
// Simpson filter from PBRT v2. Filter the photons according their
// distance, giving more weight to the nearest.
Simpson filter from PBRT v2. Filter the photons according their
distance, giving more weight to the nearest.
Simpson filter from PBRT v2 . Filter the photons according their distance giving more weight to the nearest .
static inline float SimpsonKernel(const Point &p1, const Point &p2,
		const float maxDist2) {
	const float dist2 = DistanceSquared(p1, p2);
	assert (dist2 <= maxDist2);
    const float s = (1.f - dist2 / maxDist2);
    return 3.f * INV_PI * s * s;
}
static inline float SimpsonKernel ( const Point & p1 , const Point & p2 , const float maxDist2 ) { const float dist2 = DistanceSquared ( p1 , p2 ) ; assert ( dist2 <= maxDist2 ) ; const float s = ( 1.f - dist2 / maxDist2 ) ; return 3.f * INV_PI * s * s ; }
Simpson filter from PBRT v2.
Simpson filter from PBRT v2 .
// The distance between p1 and p2 is supposed to be < maxDist2