metadata
Wenzel Jakob 2013-08-28 17:11:47 +02:00
commit 221a93d67d
1 changed files with 1 additions and 1 deletions

View File

@ -169,7 +169,7 @@ Spectrum BeamRadianceEstimator::query(const Ray &r, const Medium *medium) const
Float diskDistance = dot(originToCenter, ray.d), radSqr = node.radius * node.radius; Float diskDistance = dot(originToCenter, ray.d), radSqr = node.radius * node.radius;
Float distSqr = (ray(diskDistance) - node.photon.getPosition()).lengthSquared(); Float distSqr = (ray(diskDistance) - node.photon.getPosition()).lengthSquared();
if (distSqr < radSqr) { if (diskDistance > 0 && distSqr < radSqr) {
Float weight = K2(distSqr/radSqr)/radSqr; Float weight = K2(distSqr/radSqr)/radSqr;
Vector wi = -node.photon.getDirection(); Vector wi = -node.photon.getDirection();