--Bug fixes

-Fix crash when using Lanczos2 filter with color curves due to negative numbers. Fix by passing abs() of first argument to pow() in Renderer::GammaCorrection().
 -Fix crash in hexes with SP. Rounding error caused out of bounds index.
This commit is contained in:
mfeemster
2016-02-23 21:01:02 -08:00
parent c282ee4c2c
commit 32d6982210
4 changed files with 202 additions and 218 deletions

View File

@ -1629,7 +1629,7 @@ void Renderer<T, bucketT>::GammaCorrection(tvec4<bucketT, glm::defaultp>& bucket
for (glm::length_t rgbi = 0; rgbi < 3; rgbi++)
{
a = newRgb[rgbi] + ((1 - vibrancy) * 255 * std::pow(bucket[rgbi], g));
a = newRgb[rgbi] + ((1 - vibrancy) * 255 * std::pow(std::abs(bucket[rgbi]), g));//Must use abs(), else it it could be a negative value and return NAN.
if (NumChannels() <= 3 || !Transparency())
{