fixed the irradiance cache
parent
d0391dff8b
commit
9035266f5c
|
@ -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)) {
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue