mipmap.h: graceful handling of invalid texture differentials

metadata
Wenzel Jakob 2014-05-21 23:36:44 +02:00
parent ff4a71309b
commit 90423fa40a
1 changed files with 1 additions and 1 deletions

View File

@ -651,7 +651,7 @@ public:
majorRadius = Aprime != 0 ? std::sqrt(F / Aprime) : 0,
minorRadius = Cprime != 0 ? std::sqrt(F / Cprime) : 0;
if (m_filterType == ETrilinear || minorRadius == 0 || F < 0) {
if (m_filterType == ETrilinear || !(minorRadius > 0) || !(majorRadius > 0) || F < 0) {
/* Determine a suitable mip map level, while preferring
blurring over aliasing */
Float level = log2(std::max(majorRadius, Epsilon));