bluenoise: avoid a division by zero issue

metadata
Wenzel Jakob 2012-10-23 10:52:07 -04:00
parent d57a3f907f
commit 3d23857765
1 changed files with 1 additions and 1 deletions

View File

@ -145,7 +145,7 @@ void blueNoisePointSet(const Scene *scene, const std::vector<Shape *> &shapes,
Vector3i cellCount;
for (int i=0; i<3; ++i)
cellCount[i] = ceilToInt(extents[i] * invCellWidth);
cellCount[i] = std::max(1, ceilToInt(extents[i] * invCellWidth));
SLog(EInfo, " phase 2: computing cell indices ..");
#if defined(MTS_OPENMP)