From 90423fa40ad5c2b200c5feb2b328f7f39c57a68f Mon Sep 17 00:00:00 2001 From: Wenzel Jakob Date: Wed, 21 May 2014 23:36:44 +0200 Subject: [PATCH] mipmap.h: graceful handling of invalid texture differentials --- include/mitsuba/render/mipmap.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/mitsuba/render/mipmap.h b/include/mitsuba/render/mipmap.h index d677a615..d5e9a959 100644 --- a/include/mitsuba/render/mipmap.h +++ b/include/mitsuba/render/mipmap.h @@ -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));