From 5bcd47fba43892e3cb1c0b7beaf3d2a9b88c26f5 Mon Sep 17 00:00:00 2001 From: Wenzel Jakob Date: Sun, 3 Jul 2011 03:02:22 +0200 Subject: [PATCH] use the improved sampling routines --- src/integrators/path/path.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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())