mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-06 07:17:42 -05:00
Merge pull request #105561 from bruvzg/a_pix
Fix `is_pixel_opaque` bound checks.
This commit is contained in:
@@ -197,8 +197,8 @@ bool ImageTexture::is_pixel_opaque(int p_x, int p_y) const {
|
||||
int x = p_x * aw / w;
|
||||
int y = p_y * ah / h;
|
||||
|
||||
x = CLAMP(x, 0, aw);
|
||||
y = CLAMP(y, 0, ah);
|
||||
x = CLAMP(x, 0, aw - 1);
|
||||
y = CLAMP(y, 0, ah - 1);
|
||||
|
||||
return alpha_cache->get_bit(x, y);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user