From 507e81641d3c2429b9a1c1aeecad43a0161f40ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Sun, 10 Jan 2016 21:20:45 -0800 Subject: [PATCH] Fixed unpackRgba4. --- src/image.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/image.cpp b/src/image.cpp index fad8f076..5bb9229c 100644 --- a/src/image.cpp +++ b/src/image.cpp @@ -1239,10 +1239,10 @@ namespace bgfx void unpackRgba4(float* _dst, const void* _src) { uint16_t packed = *( (const uint16_t*)_src); - _dst[0] = float( ( (packed ) & 0x7) ) / 15.0f; - _dst[1] = float( ( (packed>> 4) & 0x7) ) / 15.0f; - _dst[2] = float( ( (packed>> 8) & 0x7) ) / 15.0f; - _dst[3] = float( ( (packed>>12) & 0x7) ) / 15.0f; + _dst[0] = float( ( (packed ) & 0xf) ) / 15.0f; + _dst[1] = float( ( (packed>> 4) & 0xf) ) / 15.0f; + _dst[2] = float( ( (packed>> 8) & 0xf) ) / 15.0f; + _dst[3] = float( ( (packed>>12) & 0xf) ) / 15.0f; } // RGB5A1