fixed infinite recursion possibility in the path tracer

metadata
Wenzel Jakob 2010-08-30 10:12:37 +02:00
parent 25730ec2eb
commit 3b77937d78
3 changed files with 3 additions and 3 deletions

View File

@ -146,7 +146,7 @@ public:
/* Assuming that BSDF importance sampling is perfect,
the following should equal the maximum albedo
over all spectral samples */
Float approxAlbedo = std::min((Float) 1, bsdfVal.max());
Float approxAlbedo = std::min((Float) 0.9f, bsdfVal.max());
if (rRec.nextSample1D() > approxAlbedo)
break;
else

View File

@ -258,7 +258,7 @@ public:
/* Assuming that BSDF importance sampling is perfect,
the following should equal the maximum albedo
over all spectral samples */
Float approxAlbedo = std::min((Float) 1, bsdfVal.max());
Float approxAlbedo = std::min((Float) 0.9f, bsdfVal.max());
if (rRec.nextSample1D() > approxAlbedo)
break;
else

View File

@ -193,7 +193,7 @@ public:
/* Assuming that BSDF importance sampling is perfect,
the following should equal the maximum albedo
over all spectral samples */
Float approxAlbedo = std::min((Float) 1, bsdfVal.max());
Float approxAlbedo = std::min((Float) 0.9, bsdfVal.max());
if (rRec.nextSample1D() > approxAlbedo)
break;
else