From 6339a585e26cc14bac696210d65dce47d7728711 Mon Sep 17 00:00:00 2001 From: castano Date: Sat, 15 Sep 2007 07:11:59 +0000 Subject: [PATCH] Update changelog Remove compiler warnings --- ChangeLog | 3 +++ src/nvimage/nvtt/QuickCompressDXT.cpp | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index cfadba9..b0187f8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -28,4 +28,7 @@ NVIDIA Texture Tools version 0.9.4 NVIDIA Texture Tools version 0.9.5 * Fixed PSNR formula. * Added support for arbitrary RGB formats. + * Add support for DXT1a. + * Refactor and improve compression quality of fast compressors. + * Add cmake scripts to detect processor and chose compiler options. diff --git a/src/nvimage/nvtt/QuickCompressDXT.cpp b/src/nvimage/nvtt/QuickCompressDXT.cpp index 89b72c0..e6c979b 100644 --- a/src/nvimage/nvtt/QuickCompressDXT.cpp +++ b/src/nvimage/nvtt/QuickCompressDXT.cpp @@ -110,9 +110,9 @@ inline static void insetBBox(Vector3 * __restrict maxColor, Vector3 * __restrict inline static uint16 roundAndExpand(Vector3 * v) { - uint r = clamp(v->x() * (31.0f / 255.0f), 0.0f, 31.0f) + 0.5f; - uint g = clamp(v->y() * (63.0f / 255.0f), 0.0f, 63.0f) + 0.5f; - uint b = clamp(v->z() * (31.0f / 255.0f), 0.0f, 31.0f) + 0.5f; + uint r = uint(clamp(v->x() * (31.0f / 255.0f), 0.0f, 31.0f) + 0.5f); + uint g = uint(clamp(v->y() * (63.0f / 255.0f), 0.0f, 63.0f) + 0.5f); + uint b = uint(clamp(v->z() * (31.0f / 255.0f), 0.0f, 31.0f) + 0.5f); uint16 w = (r << 11) | (g << 5) | b;