From a6e6138084f6618729d59e1790e2c09ebce26dbd Mon Sep 17 00:00:00 2001 From: Pavel Krajcevski Date: Thu, 5 Sep 2013 14:49:56 -0400 Subject: [PATCH] Change the lerp function to be more explicit. --- PVRTCEncoder/src/Decompressor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PVRTCEncoder/src/Decompressor.cpp b/PVRTCEncoder/src/Decompressor.cpp index 2f7db28..bb458a3 100644 --- a/PVRTCEncoder/src/Decompressor.cpp +++ b/PVRTCEncoder/src/Decompressor.cpp @@ -190,7 +190,7 @@ namespace PVRTCC { int16 va = static_cast(pa.Component(c)); int16 vb = static_cast(pb.Component(c)); - result.Component(c) = va + ((vb - va) * lerpVal) / 8; + result.Component(c) = (va * (8 - lerpVal) + vb * lerpVal) / 8; } }