diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-01-12 21:10:49 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-01-12 21:10:49 +0100 |
commit | 6dba67c27de129bb67c8db8acc6a613659562e54 (patch) | |
tree | dc31999ef64012215101fc545b9edbcea8a10f07 | |
parent | aaa5158ff9c6edbd4320f0c7b8c8b8047ec3aea8 (diff) | |
parent | a1a2c2c2cecbeaabe62967f95bb714e136359c52 (diff) |
Merge pull request #71247 from rsjtdrjgfuzkfg/etcpak
etcpak: Fix ETCPAK_TYPE_ETC2_RA_AS_RG
-rw-r--r-- | modules/etcpak/image_compress_etcpak.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/etcpak/image_compress_etcpak.cpp b/modules/etcpak/image_compress_etcpak.cpp index 1fd98a43d4..b5192bd664 100644 --- a/modules/etcpak/image_compress_etcpak.cpp +++ b/modules/etcpak/image_compress_etcpak.cpp @@ -118,6 +118,7 @@ void _compress_etcpak(EtcpakType p_compresstype, Image *r_img, float p_lossy_qua } else if (p_compresstype == EtcpakType::ETCPAK_TYPE_ETC2_RA_AS_RG) { target_format = Image::FORMAT_ETC2_RA_AS_RG; r_img->convert_rg_to_ra_rgba8(); + r_img->convert_rgba8_to_bgra8(); // It's badly documented but ETCPAK seems to be expected BGRA8 for ETC. } else if (p_compresstype == EtcpakType::ETCPAK_TYPE_ETC2_ALPHA) { target_format = Image::FORMAT_ETC2_RGBA8; r_img->convert_rgba8_to_bgra8(); // It's badly documented but ETCPAK seems to be expected BGRA8 for ETC. @@ -222,9 +223,9 @@ void _compress_etcpak(EtcpakType p_compresstype, Image *r_img, float p_lossy_qua } if (p_compresstype == EtcpakType::ETCPAK_TYPE_ETC1) { CompressEtc1RgbDither(src_mip_read, dest_mip_write, blocks, mip_w); - } else if (p_compresstype == EtcpakType::ETCPAK_TYPE_ETC2 || p_compresstype == EtcpakType::ETCPAK_TYPE_ETC2_RA_AS_RG) { + } else if (p_compresstype == EtcpakType::ETCPAK_TYPE_ETC2) { CompressEtc2Rgb(src_mip_read, dest_mip_write, blocks, mip_w, true); - } else if (p_compresstype == EtcpakType::ETCPAK_TYPE_ETC2_ALPHA) { + } else if (p_compresstype == EtcpakType::ETCPAK_TYPE_ETC2_ALPHA || p_compresstype == EtcpakType::ETCPAK_TYPE_ETC2_RA_AS_RG) { CompressEtc2Rgba(src_mip_read, dest_mip_write, blocks, mip_w, true); } else if (p_compresstype == EtcpakType::ETCPAK_TYPE_DXT1) { CompressDxt1Dither(src_mip_read, dest_mip_write, blocks, mip_w); |