From d69aef23689debec880398c63132aa9724a84b5a Mon Sep 17 00:00:00 2001 From: Robin Allen Date: Wed, 4 Mar 2020 17:55:17 +0000 Subject: [PATCH] Fix bug where loading uncompressed sRGB KTX files would swap B/R --- src/image.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/image.cpp b/src/image.cpp index ad8ba3d..059e7e2 100644 --- a/src/image.cpp +++ b/src/image.cpp @@ -4011,8 +4011,9 @@ namespace bimg break; } - if (s_translateKtxFormat[ii].m_internalFmtSrgb == glInternalFormat) - { + if (s_translateKtxFormat[ii].m_internalFmtSrgb == glInternalFormat + && s_translateKtxFormat[ii].m_fmt == glBaseInternalFormat) + { format = TextureFormat::Enum(ii); srgb = true; break;