Betsy: Add BC3 and BC5 support

This commit is contained in:
BlueCube3310
2024-11-22 13:45:12 +01:00
parent f952bfe998
commit 88ffe07de9
5 changed files with 441 additions and 243 deletions

View File

@@ -2788,8 +2788,7 @@ Error Image::compress_from_channels(CompressMode p_mode, UsedChannels p_channels
} break;
case COMPRESS_S3TC: {
// BC3 is unsupported currently.
if ((p_channels == USED_CHANNELS_R || p_channels == USED_CHANNELS_RGB || p_channels == USED_CHANNELS_L) && _image_compress_bc_rd_func) {
if (_image_compress_bc_rd_func) {
Error result = _image_compress_bc_rd_func(this, p_channels);
// If the image was compressed successfully, we return here. If not, we fall back to the default compression scheme.