From e8bb3f28869c4280085189099f52dec309ffc19d Mon Sep 17 00:00:00 2001 From: castano Date: Mon, 19 May 2008 18:30:08 +0000 Subject: [PATCH] Merge Noel's fix to the 2.0 branch. --- ChangeLog | 1 + src/nvimage/FloatImage.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 39a9b05..9a32702 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ NVIDIA Texture Tools version 2.0.3 * More accurate DXT3 compressor. Fixes issue 38. + * Fix error in fast downsample filter, reported by Noel Llopis. NVIDIA Texture Tools version 2.0.2 * Fix copy ctor error reported by Richard Sim. diff --git a/src/nvimage/FloatImage.cpp b/src/nvimage/FloatImage.cpp index 75d02a1..baa99dd 100644 --- a/src/nvimage/FloatImage.cpp +++ b/src/nvimage/FloatImage.cpp @@ -376,7 +376,7 @@ FloatImage * FloatImage::fastDownSample() const { const uint n = w * h; - if (n & 1) + if ((m_width * m_height) & 1) { const float scale = 1.0f / (2 * n + 1);