From b09c6a7f6fed6cee2a3a09dda30a772d67980794 Mon Sep 17 00:00:00 2001 From: Wenzel Jakob Date: Sun, 3 Jul 2011 03:03:43 +0200 Subject: [PATCH] added support for the improved sampling routines in a few more places --- src/integrators/path/volpath.cpp | 4 +++- src/integrators/path/volpath_simple.cpp | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/integrators/path/volpath.cpp b/src/integrators/path/volpath.cpp index ee2e9cf4..f14c9a6b 100644 --- a/src/integrators/path/volpath.cpp +++ b/src/integrators/path/volpath.cpp @@ -224,7 +224,8 @@ public: const Vector wo = -lRec.d; /* Allocate a record for querying the BSDF */ - 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); @@ -252,6 +253,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()) diff --git a/src/integrators/path/volpath_simple.cpp b/src/integrators/path/volpath_simple.cpp index 1b7176a9..d0849b1c 100644 --- a/src/integrators/path/volpath_simple.cpp +++ b/src/integrators/path/volpath_simple.cpp @@ -168,7 +168,8 @@ public: rRec.nextSample2D(), rRec.sampler)) { /* 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; Float woDotGeoN = dot(its.geoFrame.n, wo); /* Prevent light leaks due to the use of shading normals */ @@ -183,6 +184,7 @@ public: /* Sample BSDF * cos(theta) */ BSDFQueryRecord bRec(its); + bRec.sampler = rRec.sampler; Spectrum bsdfVal = bsdf->sampleCos(bRec, rRec.nextSample2D()); if (bsdfVal.isZero()) break;