photonmapper: fixed shading on the backside of diffuse surfaces
parent
773085525f
commit
ab4525afba
|
@ -445,7 +445,7 @@ public:
|
||||||
/* Exhaustively recurse into all specular lobes? */
|
/* Exhaustively recurse into all specular lobes? */
|
||||||
bool exhaustiveSpecular = rRec.depth < m_maxSpecularDepth && !cacheQuery;
|
bool exhaustiveSpecular = rRec.depth < m_maxSpecularDepth && !cacheQuery;
|
||||||
|
|
||||||
if (isDiffuse) {
|
if (isDiffuse && (dot(its.shFrame.n, ray.d) < 0 || (bsdf->getType() & BSDF::EBackSide))) {
|
||||||
/* 1. Diffuse indirect */
|
/* 1. Diffuse indirect */
|
||||||
int maxDepth = m_maxDepth == -1 ? INT_MAX : (m_maxDepth-rRec.depth);
|
int maxDepth = m_maxDepth == -1 ? INT_MAX : (m_maxDepth-rRec.depth);
|
||||||
if (rRec.type & RadianceQueryRecord::EIndirectSurfaceRadiance && m_globalPhotonMap.get())
|
if (rRec.type & RadianceQueryRecord::EIndirectSurfaceRadiance && m_globalPhotonMap.get())
|
||||||
|
|
Loading…
Reference in New Issue