disk/rectangle shape: be less paranoid about shear
parent
f831e0ba99
commit
6baac6fb73
|
@ -105,7 +105,7 @@ public:
|
|||
Vector dpdu = trafo(Vector(1, 0, 0));
|
||||
Vector dpdv = trafo(Vector(0, 1, 0));
|
||||
|
||||
if (std::abs(dot(dpdu, dpdv)) > 1e-3f)
|
||||
if (std::abs(dot(normalize(dpdu), normalize(dpdv))) > 1e-3f)
|
||||
Log(EError, "Error: 'toWorld' transformation contains shear!");
|
||||
|
||||
if (std::abs(dpdu.length() / dpdv.length() - 1) > 1e-3f)
|
||||
|
|
|
@ -105,7 +105,7 @@ public:
|
|||
m_frame = Frame(normalize(m_dpdu), normalize(m_dpdv), normal);
|
||||
|
||||
m_invSurfaceArea = 1.0f / getSurfaceArea();
|
||||
if (std::abs(dot(m_dpdu, m_dpdv)) > Epsilon)
|
||||
if (std::abs(dot(normalize(m_dpdu), normalize(m_dpdv))) > Epsilon)
|
||||
Log(EError, "Error: 'toWorld' transformation contains shear!");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue