photonmapper: fixed shading on the backside of diffuse surfaces

metadata
Wenzel Jakob 2013-09-26 16:45:28 +02:00
parent 773085525f
commit ab4525afba
1 changed files with 1 additions and 1 deletions

View File

@ -445,7 +445,7 @@ public:
/* Exhaustively recurse into all specular lobes? */
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 */
int maxDepth = m_maxDepth == -1 ? INT_MAX : (m_maxDepth-rRec.depth);
if (rRec.type & RadianceQueryRecord::EIndirectSurfaceRadiance && m_globalPhotonMap.get())