diff --git a/encoder/basisu_gpu_texture.cpp b/encoder/basisu_gpu_texture.cpp index 23ef016..7627bb2 100644 --- a/encoder/basisu_gpu_texture.cpp +++ b/encoder/basisu_gpu_texture.cpp @@ -1527,13 +1527,13 @@ namespace basisu case texture_format::cBC6HSigned: { internal_fmt = KTX_COMPRESSED_RGB_BPTC_SIGNED_FLOAT; - base_internal_fmt = KTX_RGBA; + base_internal_fmt = KTX_RGB; break; } case texture_format::cBC6HUnsigned: { internal_fmt = KTX_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT; - base_internal_fmt = KTX_RGBA; + base_internal_fmt = KTX_RGB; break; } case texture_format::cBC7: @@ -1556,8 +1556,8 @@ namespace basisu case texture_format::cASTC_HDR_6x6: { internal_fmt = KTX_COMPRESSED_RGBA_ASTC_6x6_KHR; - // TODO: should we write RGB? We don't support generating HDR 6x6 with alpha. - base_internal_fmt = KTX_RGBA; + // RGBA is correct: ASTC HDR can have alpha, and the RGBA ASTC token's base format is RGBA. + base_internal_fmt = KTX_RGBA; break; } // We use different enums for HDR vs. LDR ASTC, but internally they are both just ASTC. diff --git a/transcoder/basisu_transcoder.h b/transcoder/basisu_transcoder.h index 68b5ada..a317613 100644 --- a/transcoder/basisu_transcoder.h +++ b/transcoder/basisu_transcoder.h @@ -273,7 +273,7 @@ namespace basist // Disable deblock filtering for XUASTC LDR/ASTC LDR transcoding to non-ASTC formats. // For block sizes smaller than 10x8 (block area < BASISU_DEBLOCKING_BLOCK_SIZE_THRESHOLD texels), deblocking is disabled by default during encoding, but it can be enabled via compressor parameters. // Note: The encoder writes a "DeblockFilterID" key value field into KTX2 files. By default (i.e. when neither this flag nor cDecodeFlagsForceDeblockFiltering - // is specified), the transcoder uses that field to decide if CPU deblocking should occur during transcoding. Specifying this flag, or + // is specified), the KTX2 transcoder uses that field to decide if CPU deblocking should occur during transcoding. Specifying this flag, or // cDecodeFlagsForceDeblockFiltering, causes the transcoder to IGNORE the file's DeblockFilterID field and use the requested behavior instead. cDecodeFlagsNoDeblockFiltering = 128,