fixed infinite recursion possibility in the path tracer
parent
25730ec2eb
commit
3b77937d78
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue