several MLT-related improvements submitted by Anton Kaplanyan
parent
3446283c9e
commit
2a0ffd1ceb
|
@ -189,7 +189,7 @@ public:
|
|||
fail = true;
|
||||
if (fail)
|
||||
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());
|
||||
}
|
||||
backup.release(*m_pool);
|
||||
|
|
|
@ -387,7 +387,8 @@ bool SpecularManifold::computeTangents() {
|
|||
|
||||
for (int i=0; i < n - 1; ++i) {
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -260,7 +260,7 @@ Float BidirectionalMutator::Q(const Path &source, const Path &proposal,
|
|||
|
||||
Float luminance = weight.getLuminance();
|
||||
|
||||
if (luminance <= 0) {
|
||||
if (luminance <= 0 || !std::isfinite(luminance)) {
|
||||
Log(EWarn, "Internal error: luminance = %f!", luminance);
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue