{
Vec4 p = access.getPixel(x, y, z);
- minVal[0] = de::min(minVal[0], p[0]);
- minVal[1] = de::min(minVal[1], p[1]);
- minVal[2] = de::min(minVal[2], p[2]);
- minVal[3] = de::min(minVal[3], p[3]);
-
- maxVal[0] = de::max(maxVal[0], p[0]);
- maxVal[1] = de::max(maxVal[1], p[1]);
- maxVal[2] = de::max(maxVal[2], p[2]);
- maxVal[3] = de::max(maxVal[3], p[3]);
+ minVal[0] = (deFloatIsNaN(p[0]) ? minVal[0] : de::min(minVal[0], p[0]));
+ minVal[1] = (deFloatIsNaN(p[1]) ? minVal[1] : de::min(minVal[1], p[1]));
+ minVal[2] = (deFloatIsNaN(p[2]) ? minVal[2] : de::min(minVal[2], p[2]));
+ minVal[3] = (deFloatIsNaN(p[3]) ? minVal[3] : de::min(minVal[3], p[3]));
+
+ maxVal[0] = (deFloatIsNaN(p[0]) ? maxVal[0] : de::max(maxVal[0], p[0]));
+ maxVal[1] = (deFloatIsNaN(p[1]) ? maxVal[1] : de::max(maxVal[1], p[1]));
+ maxVal[2] = (deFloatIsNaN(p[2]) ? maxVal[2] : de::max(maxVal[2], p[2]));
+ maxVal[3] = (deFloatIsNaN(p[3]) ? maxVal[3] : de::max(maxVal[3], p[3]));
}
}
}