fixed manifold exploration for point light sources and cylinders (cardioid test scene works again..)

metadata
Wenzel Jakob 2012-10-22 22:02:35 -04:00
parent f1f91c2ebd
commit 4a86baac4e
2 changed files with 2 additions and 2 deletions

View File

@ -915,7 +915,7 @@ Float SpecularManifold::G(const Path &path, int a, int b) {
SimpleVertex &last = m_vertices[m_vertices.size()-1];
const PathVertex *vb = path.vertex(b);
if (vb->isMediumInteraction()) {
if (!vb->isOnSurface()) {
last.n = Vector(path.edge(a < b ? (b-1) : b)->d);
} else {
last.n = vb->getShadingNormal();

View File

@ -495,7 +495,7 @@ public:
void getNormalDerivative(const Intersection &its,
Vector &dndu, Vector &dndv, bool shadingFrame) const {
dndu = its.dpdu / m_radius;
dndu = its.dpdu / (m_radius * m_flipNormals ? -1 : 1);
dndv = Vector(0.0f);
}