added support for the improved sampling routines in a few more places
parent
5bcd47fba4
commit
b09c6a7f6f
|
@ -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())
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue