From 4aea9f74e650743fe6585d5230dd6e5f6c94c478 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Thu, 26 Sep 2019 23:16:44 -0300 Subject: Rewritten StreamTexture for better code reuse, added basis universal support --- modules/cvtt/image_compress_cvtt.cpp | 4 ++-- modules/cvtt/image_compress_cvtt.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/cvtt') 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 -- cgit v1.2.3