diff --git a/src/integrators/path/path.cpp b/src/integrators/path/path.cpp index 684fcc69..3888cada 100644 --- a/src/integrators/path/path.cpp +++ b/src/integrators/path/path.cpp @@ -103,7 +103,8 @@ public: scene->sampleLuminaire(its.p, ray.time, lRec, rRec.nextSample2D())) { /* Allocate a record for querying the BSDF */ const Vector wo = -lRec.d; - const BSDFQueryRecord bRec(its, its.toLocal(wo)); + BSDFQueryRecord bRec(its, its.toLocal(wo)); + bRec.sampler = rRec.sampler; /* Evaluate BSDF * cos(theta) */ const Spectrum bsdfVal = bsdf->fCos(bRec); @@ -131,6 +132,7 @@ public: /* Sample BSDF * cos(theta) */ BSDFQueryRecord bRec(its); + bRec.sampler = rRec.sampler; Float bsdfPdf; Spectrum bsdfVal = bsdf->sampleCos(bRec, bsdfPdf, rRec.nextSample2D()); if (bsdfVal.isZero())