use the improved sampling routines
parent
1cef7172cd
commit
5bcd47fba4
|
@ -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())
|
||||
|
|
Loading…
Reference in New Issue