fixed the irradiance cache
parent
d0391dff8b
commit
9035266f5c
|
@ -60,7 +60,7 @@ public:
|
||||||
/* Multiplicative factor for the quality parameter following an
|
/* Multiplicative factor for the quality parameter following an
|
||||||
overture pass. This can be used to interpolate amongst more
|
overture pass. This can be used to interpolate amongst more
|
||||||
samples, creating a visually smoother result. Must be
|
samples, creating a visually smoother result. Must be
|
||||||
1 or less. */
|
1 or less. */
|
||||||
m_qualityAdjustment = props.getFloat("qualityAdjustment", .5f);
|
m_qualityAdjustment = props.getFloat("qualityAdjustment", .5f);
|
||||||
/* If set to true, sample locations will be visually highlighted */
|
/* If set to true, sample locations will be visually highlighted */
|
||||||
m_debug = props.getBoolean("debug", false);
|
m_debug = props.getBoolean("debug", false);
|
||||||
|
@ -82,7 +82,7 @@ public:
|
||||||
/* If set to false, direct illumination will be suppressed -
|
/* If set to false, direct illumination will be suppressed -
|
||||||
useful for checking the interpolation quality */
|
useful for checking the interpolation quality */
|
||||||
m_direct = props.getBoolean("direct", true);
|
m_direct = props.getBoolean("direct", true);
|
||||||
|
|
||||||
Assert(m_influenceMax > m_influenceMin);
|
Assert(m_influenceMax > m_influenceMin);
|
||||||
Assert(m_influenceMax > 0 && m_influenceMax < 1);
|
Assert(m_influenceMax > 0 && m_influenceMax < 1);
|
||||||
Assert(m_influenceMin > 0 && m_influenceMin < 1);
|
Assert(m_influenceMin > 0 && m_influenceMin < 1);
|
||||||
|
@ -229,7 +229,7 @@ public:
|
||||||
if (rRec.rayIntersect(ray)) {
|
if (rRec.rayIntersect(ray)) {
|
||||||
const BSDF *bsdf = its.getBSDF(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)) {
|
(rRec.type & RadianceQueryRecord::EIndirectSurfaceRadiance)) {
|
||||||
Spectrum E;
|
Spectrum E;
|
||||||
if (!m_irrCache->get(its, E)) {
|
if (!m_irrCache->get(its, E)) {
|
||||||
|
|
|
@ -109,7 +109,7 @@ public:
|
||||||
const BSDF *bsdf = its.shape->getBSDF();
|
const BSDF *bsdf = its.shape->getBSDF();
|
||||||
if (!bsdf)
|
if (!bsdf)
|
||||||
continue;
|
continue;
|
||||||
if (!bsdf->getType() == BSDF::EDiffuseReflection)
|
if ((bsdf->getType() & BSDF::EAll) != BSDF::EDiffuseReflection)
|
||||||
continue;
|
continue;
|
||||||
if (m_irrCache->get(its, E))
|
if (m_irrCache->get(its, E))
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in New Issue