From 439e0027ecbec06afbddad9f3dd50e855482301b Mon Sep 17 00:00:00 2001 From: Eric Rybicki Date: Mon, 20 Jan 2020 15:52:09 +0100 Subject: Fix AtlasPacker ignoring semi-transparent pixels Fixes #33106 --- core/image.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'core/image.cpp') diff --git a/core/image.cpp b/core/image.cpp index 672f850a1f..18d0653bae 100644 --- a/core/image.cpp +++ b/core/image.cpp @@ -2027,8 +2027,7 @@ Rect2 Image::get_used_rect() const { for (int j = 0; j < height; j++) { for (int i = 0; i < width; i++) { - bool opaque = get_pixel(i, j).a > 0.99; - if (!opaque) + if (!(get_pixel(i, j).a > 0)) continue; if (i > maxx) maxx = i; -- cgit v1.2.3