diff options
author | Juan Linietsky <reduzio@gmail.com> | 2019-09-26 23:16:44 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2020-02-11 12:02:36 +0100 |
commit | 4aea9f74e650743fe6585d5230dd6e5f6c94c478 (patch) | |
tree | 5ee02ffbe4ec128317e3c7cdca4861f6a39fb382 /modules/cvtt | |
parent | 263bebe0237b85b1343ba17b117c8c43287ecc57 (diff) |
Rewritten StreamTexture for better code reuse, added basis universal support
Diffstat (limited to 'modules/cvtt')
-rw-r--r-- | modules/cvtt/image_compress_cvtt.cpp | 4 | ||||
-rw-r--r-- | modules/cvtt/image_compress_cvtt.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/modules/cvtt/image_compress_cvtt.cpp b/modules/cvtt/image_compress_cvtt.cpp index c261350e89..4d762b7a7b 100644 --- a/modules/cvtt/image_compress_cvtt.cpp +++ b/modules/cvtt/image_compress_cvtt.cpp @@ -136,7 +136,7 @@ static void _digest_job_queue(void *p_job_queue) { } } -void image_compress_cvtt(Image *p_image, float p_lossy_quality, Image::CompressSource p_source) { +void image_compress_cvtt(Image *p_image, float p_lossy_quality, Image::UsedChannels p_channels) { if (p_image->get_format() >= Image::FORMAT_BPTC_RGBA) return; //do not compress, already compressed @@ -167,7 +167,7 @@ void image_compress_cvtt(Image *p_image, float p_lossy_quality, Image::CompressS flags |= cvtt::Flags::BC7_RespectPunchThrough; - if (p_source == Image::COMPRESS_SOURCE_NORMAL) { + if (p_channels == Image::USED_CHANNELS_RG) { //guessing this is a normalmap flags |= cvtt::Flags::Uniform; } diff --git a/modules/cvtt/image_compress_cvtt.h b/modules/cvtt/image_compress_cvtt.h index ecb876ecc6..c1772199af 100644 --- a/modules/cvtt/image_compress_cvtt.h +++ b/modules/cvtt/image_compress_cvtt.h @@ -33,7 +33,7 @@ #include "core/image.h" -void image_compress_cvtt(Image *p_image, float p_lossy_quality, Image::CompressSource p_source); +void image_compress_cvtt(Image *p_image, float p_lossy_quality, Image::UsedChannels p_channels); void image_decompress_cvtt(Image *p_image); #endif // IMAGE_COMPRESS_CVTT_H |