Browse Source

Fix bug where loading uncompressed sRGB KTX files would swap B/R

Robin Allen 5 years ago
parent
commit
d69aef2368
1 changed files with 3 additions and 2 deletions
  1. 3 2
      src/image.cpp

+ 3 - 2
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;