diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-01-30 20:41:01 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-01-30 20:41:01 +0100 |
commit | e9de988020f3d46c3e7b4fd5a8a80724996035e0 (patch) | |
tree | f2506cfffc7af7a7ecb449b2ba59b5b7963dd40c /modules/etcpak/image_compress_etcpak.cpp | |
parent | 1a37aefbf9fbac494294f00e675f665a5f44c347 (diff) | |
parent | 28f51ba547722d1283882ec5dee9bcab070bc33e (diff) |
Merge pull request #72031 from reduz/change-high-quality-texture-import
Refactor high quality texture import
Diffstat (limited to 'modules/etcpak/image_compress_etcpak.cpp')
-rw-r--r-- | modules/etcpak/image_compress_etcpak.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/modules/etcpak/image_compress_etcpak.cpp b/modules/etcpak/image_compress_etcpak.cpp index a6aeec54cc..16a59d3880 100644 --- a/modules/etcpak/image_compress_etcpak.cpp +++ b/modules/etcpak/image_compress_etcpak.cpp @@ -74,25 +74,23 @@ EtcpakType _determine_dxt_type(Image::UsedChannels p_channels) { } } -void _compress_etc1(Image *r_img, float p_lossy_quality) { - _compress_etcpak(EtcpakType::ETCPAK_TYPE_ETC1, r_img, p_lossy_quality); +void _compress_etc1(Image *r_img) { + _compress_etcpak(EtcpakType::ETCPAK_TYPE_ETC1, r_img); } -void _compress_etc2(Image *r_img, float p_lossy_quality, Image::UsedChannels p_channels) { +void _compress_etc2(Image *r_img, Image::UsedChannels p_channels) { EtcpakType type = _determine_etc_type(p_channels); - _compress_etcpak(type, r_img, p_lossy_quality); + _compress_etcpak(type, r_img); } -void _compress_bc(Image *r_img, float p_lossy_quality, Image::UsedChannels p_channels) { +void _compress_bc(Image *r_img, Image::UsedChannels p_channels) { EtcpakType type = _determine_dxt_type(p_channels); - _compress_etcpak(type, r_img, p_lossy_quality); + _compress_etcpak(type, r_img); } -void _compress_etcpak(EtcpakType p_compresstype, Image *r_img, float p_lossy_quality) { +void _compress_etcpak(EtcpakType p_compresstype, Image *r_img) { uint64_t start_time = OS::get_singleton()->get_ticks_msec(); - // TODO: See how to handle lossy quality. - Image::Format img_format = r_img->get_format(); if (img_format >= Image::FORMAT_DXT1) { return; // Do not compress, already compressed. |