diff options
Diffstat (limited to 'modules/cvtt')
-rw-r--r-- | modules/cvtt/image_compress_cvtt.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/modules/cvtt/image_compress_cvtt.cpp b/modules/cvtt/image_compress_cvtt.cpp index 40e0f1a08f..2a4f836478 100644 --- a/modules/cvtt/image_compress_cvtt.cpp +++ b/modules/cvtt/image_compress_cvtt.cpp @@ -137,8 +137,9 @@ static void _digest_job_queue(void *p_job_queue) { } void image_compress_cvtt(Image *p_image, float p_lossy_quality, Image::UsedChannels p_channels) { - if (p_image->get_format() >= Image::FORMAT_BPTC_RGBA) + if (p_image->get_format() >= Image::FORMAT_BPTC_RGBA) { return; //do not compress, already compressed + } int w = p_image->get_width(); int h = p_image->get_height(); @@ -153,16 +154,17 @@ void image_compress_cvtt(Image *p_image, float p_lossy_quality, Image::UsedChann cvtt::Options options; uint32_t flags = cvtt::Flags::Fastest; - if (p_lossy_quality > 0.85) + if (p_lossy_quality > 0.85) { flags = cvtt::Flags::Ultra; - else if (p_lossy_quality > 0.75) + } else if (p_lossy_quality > 0.75) { flags = cvtt::Flags::Better; - else if (p_lossy_quality > 0.55) + } else if (p_lossy_quality > 0.55) { flags = cvtt::Flags::Default; - else if (p_lossy_quality > 0.35) + } else if (p_lossy_quality > 0.35) { flags = cvtt::Flags::Fast; - else if (p_lossy_quality > 0.15) + } else if (p_lossy_quality > 0.15) { flags = cvtt::Flags::Faster; + } flags |= cvtt::Flags::BC7_RespectPunchThrough; |