diff --git a/src/integrators/misc/irrcache.cpp b/src/integrators/misc/irrcache.cpp index 7508078e..4573f250 100644 --- a/src/integrators/misc/irrcache.cpp +++ b/src/integrators/misc/irrcache.cpp @@ -60,7 +60,7 @@ public: /* Multiplicative factor for the quality parameter following an overture pass. This can be used to interpolate amongst more samples, creating a visually smoother result. Must be - 1 or less. */ + 1 or less. */ m_qualityAdjustment = props.getFloat("qualityAdjustment", .5f); /* If set to true, sample locations will be visually highlighted */ m_debug = props.getBoolean("debug", false); @@ -82,7 +82,7 @@ public: /* If set to false, direct illumination will be suppressed - useful for checking the interpolation quality */ m_direct = props.getBoolean("direct", true); - + Assert(m_influenceMax > m_influenceMin); Assert(m_influenceMax > 0 && m_influenceMax < 1); Assert(m_influenceMin > 0 && m_influenceMin < 1); @@ -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)) { diff --git a/src/integrators/misc/irrcache_proc.cpp b/src/integrators/misc/irrcache_proc.cpp index 2fb5d025..693c69fe 100644 --- a/src/integrators/misc/irrcache_proc.cpp +++ b/src/integrators/misc/irrcache_proc.cpp @@ -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;