changing the GL base internal format for BC6H to be RGB not RGBA

This commit is contained in:
Richard Geldreich
2026-07-03 02:06:10 -04:00
parent 0442737aa7
commit 0857faf8d7
2 changed files with 5 additions and 5 deletions

View File

@@ -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.

View File

@@ -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,