fixed infinite recursion possibility in the VPL generator
parent
3b77937d78
commit
45b381d0ac
|
@ -54,7 +54,7 @@ size_t generateVPLs(const Scene *scene, size_t offset, size_t count, int maxDept
|
||||||
/* Assuming that BSDF importance sampling is perfect,
|
/* Assuming that BSDF importance sampling is perfect,
|
||||||
the following should equal the maximum albedo
|
the following should equal the maximum albedo
|
||||||
over all spectral samples */
|
over all spectral samples */
|
||||||
Float approxAlbedo = std::min((Float) 1, bsdfVal.max());
|
Float approxAlbedo = std::min((Float) 0.9f, bsdfVal.max());
|
||||||
if (sampler->next1D() > approxAlbedo)
|
if (sampler->next1D() > approxAlbedo)
|
||||||
break;
|
break;
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue