From b072d10b6cd600b337043ca461518181473adbd6 Mon Sep 17 00:00:00 2001 From: Pavel Krajcevski Date: Mon, 8 Apr 2013 17:03:14 -0400 Subject: [PATCH] Multiple single pixel error by number of pixels in the partition --- BPTCEncoder/src/BC7Compressor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BPTCEncoder/src/BC7Compressor.cpp b/BPTCEncoder/src/BC7Compressor.cpp index 3fd1655..1e80aac 100755 --- a/BPTCEncoder/src/BC7Compressor.cpp +++ b/BPTCEncoder/src/BC7Compressor.cpp @@ -744,7 +744,7 @@ double BC7CompressionMode::CompressCluster(const RGBACluster &cluster, RGBAVecto alphaIndices[i] = 1; } - return bestErr; + return cluster.GetNumPoints() * bestErr; } RGBACluster rgbCluster; @@ -1107,7 +1107,7 @@ double BC7CompressionMode::CompressCluster(const RGBACluster &cluster, RGBAVecto bestIndices[i] = 1; } - return bestErr; + return cluster.GetNumPoints() * bestErr; } // Now that we know the index of each pixel, we can assign the endpoints based on a least squares fit