diff options
author | Juan Linietsky <reduzio@gmail.com> | 2023-01-25 12:17:11 +0100 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2023-01-30 15:53:23 +0100 |
commit | 28f51ba547722d1283882ec5dee9bcab070bc33e (patch) | |
tree | 81a2ef0bc8aa468876bf5edb65df16e2fcc9f4ee /modules/cvtt | |
parent | 17a85973559fae0cd2c33d13c4b53f16cf7419ba (diff) |
Refactor high quality texture import
* Only two texture import modes for low/high quality now:
* S3TC/BPTC
* ETC2/ASTC
* Makes sense given this is the general preferred and most compatible combination in most platforms.
* Removed lossy_quality from VRAM texture compression options. It was unused everywhere.
* Added a new "high_quality" option to texture import. When enabled, it uses BPTC/ASTC (BC7/ASTC4x4) instead of S3TC/ETC2 (DXT1-5/ETC2,ETCA).
* Changed MacOS export settings so required texture formats depend on the architecture selected.
This solves the following problems:
* Makes it simpler to import textures as high quality, without having to worry about the specific format used.
* As the editor can now run on platforms such as web, Mac OS with Apple Silicion and Android, it should no longer be assumed that S3TC/BPTC is available by default for it.
Diffstat (limited to 'modules/cvtt')
-rw-r--r-- | modules/cvtt/image_compress_cvtt.cpp | 2 | ||||
-rw-r--r-- | modules/cvtt/image_compress_cvtt.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/cvtt/image_compress_cvtt.cpp b/modules/cvtt/image_compress_cvtt.cpp index 4982b6b995..f19228cb18 100644 --- a/modules/cvtt/image_compress_cvtt.cpp +++ b/modules/cvtt/image_compress_cvtt.cpp @@ -129,7 +129,7 @@ static void _digest_row_task(const CVTTCompressionJobParams &p_job_params, const } } -void image_compress_cvtt(Image *p_image, float p_lossy_quality, Image::UsedChannels p_channels) { +void image_compress_cvtt(Image *p_image, Image::UsedChannels p_channels) { if (p_image->get_format() >= Image::FORMAT_BPTC_RGBA) { return; //do not compress, already compressed } diff --git a/modules/cvtt/image_compress_cvtt.h b/modules/cvtt/image_compress_cvtt.h index 5dc8b6f52c..ca88a9d4c9 100644 --- a/modules/cvtt/image_compress_cvtt.h +++ b/modules/cvtt/image_compress_cvtt.h @@ -33,7 +33,7 @@ #include "core/io/image.h" -void image_compress_cvtt(Image *p_image, float p_lossy_quality, Image::UsedChannels p_channels); +void image_compress_cvtt(Image *p_image, Image::UsedChannels p_channels); void image_decompress_cvtt(Image *p_image); #endif // IMAGE_COMPRESS_CVTT_H |