several MLT-related improvements submitted by Anton Kaplanyan

metadata
Wenzel Jakob 2014-01-27 18:47:32 +01:00
parent 3446283c9e
commit 2a0ffd1ceb
3 changed files with 4 additions and 3 deletions

View File

@ -189,7 +189,7 @@ public:
fail = true; fail = true;
if (fail) if (fail)
Log(EError, "Detected an unexpected path modification outside of the " Log(EError, "Detected an unexpected path modification outside of the "
"specifed range after a mutation of type %s (k=%i)!", "specified range after a mutation of type %s (k=%i)!",
muRec.toString().c_str(), current->length()); muRec.toString().c_str(), current->length());
} }
backup.release(*m_pool); backup.release(*m_pool);

View File

@ -387,7 +387,8 @@ bool SpecularManifold::computeTangents() {
for (int i=0; i < n - 1; ++i) { for (int i=0; i < n - 1; ++i) {
m_vertices[i].u = Li * m_vertices[i].c; m_vertices[i].u = Li * m_vertices[i].c;
if (!(m_vertices[i+1].b - m_vertices[i+1].a * m_vertices[i].u).invert(Li)) Matrix2x2 temp = m_vertices[i+1].b - m_vertices[i+1].a * m_vertices[i].u;
if (!temp.invert(Li))
return false; return false;
} }

View File

@ -260,7 +260,7 @@ Float BidirectionalMutator::Q(const Path &source, const Path &proposal,
Float luminance = weight.getLuminance(); Float luminance = weight.getLuminance();
if (luminance <= 0) { if (luminance <= 0 || !std::isfinite(luminance)) {
Log(EWarn, "Internal error: luminance = %f!", luminance); Log(EWarn, "Internal error: luminance = %f!", luminance);
continue; continue;
} }