volpath_simple: fixed a minor logic error that could cause errors in light paths that simultaneously involve multiple index-matched and index-mismatched medium transitions
parent
f041cd58eb
commit
8e2bfb7340
|
@ -223,8 +223,12 @@ public:
|
|||
if ((rRec.depth < m_maxDepth || m_maxDepth < 0) &&
|
||||
(rRec.type & RadianceQueryRecord::EDirectSurfaceRadiance) &&
|
||||
(bRec.sampledType & BSDF::EDelta) &&
|
||||
!((bRec.sampledType & BSDF::ENull) && scattered))
|
||||
!((bRec.sampledType & BSDF::ENull) && scattered)) {
|
||||
recursiveType |= RadianceQueryRecord::EEmittedRadiance;
|
||||
scattered = false;
|
||||
} else {
|
||||
scattered |= bRec.sampledType != BSDF::ENull;
|
||||
}
|
||||
|
||||
/* Potentially stop the recursion if there is nothing more to do */
|
||||
if (recursiveType == 0)
|
||||
|
@ -247,7 +251,6 @@ public:
|
|||
/* In the next iteration, trace a ray in this direction */
|
||||
ray = Ray(its.p, wo, ray.time);
|
||||
scene->rayIntersect(ray, its);
|
||||
scattered |= bRec.sampledType != BSDF::ENull;
|
||||
}
|
||||
|
||||
if (rRec.depth++ >= m_rrDepth) {
|
||||
|
|
Loading…
Reference in New Issue