fixed the irradiance cache

metadata
Wenzel Jakob 2011-08-22 02:47:12 -04:00
parent d0391dff8b
commit 9035266f5c
2 changed files with 4 additions and 4 deletions

View File

@ -229,7 +229,7 @@ public:
if (rRec.rayIntersect(ray)) {
const BSDF *bsdf = its.getBSDF(ray);
if (bsdf && bsdf->getType() == BSDF::EDiffuseReflection &&
if (bsdf && (bsdf->getType() & BSDF::EAll) == BSDF::EDiffuseReflection &&
(rRec.type & RadianceQueryRecord::EIndirectSurfaceRadiance)) {
Spectrum E;
if (!m_irrCache->get(its, E)) {

View File

@ -109,7 +109,7 @@ public:
const BSDF *bsdf = its.shape->getBSDF();
if (!bsdf)
continue;
if (!bsdf->getType() == BSDF::EDiffuseReflection)
if ((bsdf->getType() & BSDF::EAll) != BSDF::EDiffuseReflection)
continue;
if (m_irrCache->get(its, E))
continue;