From 73f49920813e7db9f10ad8dc53bad5e6ca1e921b Mon Sep 17 00:00:00 2001 From: Pavel Krajcevski Date: Thu, 29 Aug 2013 18:33:56 -0400 Subject: [PATCH] If we want a color channel with zero depth then it should default to full intensity, but we will remember that there is zero depth there. --- PVRTCEncoder/src/Pixel.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/PVRTCEncoder/src/Pixel.cpp b/PVRTCEncoder/src/Pixel.cpp index e84b60e..69d3c3c 100644 --- a/PVRTCEncoder/src/Pixel.cpp +++ b/PVRTCEncoder/src/Pixel.cpp @@ -85,7 +85,9 @@ namespace PVRTCC { assert(depth <= 8); channel = 0; - if(depth + bitIdx < 8) { + if(0 == depth) { + channel = 0xFF; + } else if(depth + bitIdx < 8) { channel = bits[byteIdx] & ((1 << depth) - 1); bitIdx += depth; } else {