be a bit more strict about negative values in textures/environment maps

metadata
Wenzel Jakob 2012-10-08 22:17:23 -04:00
parent 527b661280
commit c9294d81f7
2 changed files with 9 additions and 0 deletions

View File

@ -181,6 +181,10 @@ public:
std::numeric_limits<Float>::infinity(), Spectrum::EIlluminant);
}
if (m_mipmap->getMinimum().min() < 0)
Log(EError, "\"%s\": The environment map contains negative pixel values! This is not allowed.",
m_filename.string().c_str());
if (props.hasProperty("intensityScale"))
Log(EError, "The 'intensityScale' parameter has been deprecated and is now called scale.");

View File

@ -277,6 +277,11 @@ public:
rfilter, m_wrapModeU, m_wrapModeV, m_filterType, m_maxAnisotropy,
createCache ? cacheFile : fs::path(), timestamp);
}
if ((m_mipmap1 && m_mipmap1->getMinimum().min() < 0) ||
(m_mipmap3 && m_mipmap3->getMinimum().min() < 0))
Log(EError, "\"%s\": The texture map contains negative pixel values! This is not allowed.",
m_filename.string().c_str());
}
inline ReconstructionFilter::EBoundaryCondition parseWrapMode(const std::string &wrapMode) {