From 2a886b6543d21de71b2abea1999415671968f449 Mon Sep 17 00:00:00 2001 From: Anuken Date: Wed, 7 Aug 2024 16:36:03 -0400 Subject: [PATCH] Fixed alpha clamp --- arc-core/src/arc/graphics/g2d/Draw.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arc-core/src/arc/graphics/g2d/Draw.java b/arc-core/src/arc/graphics/g2d/Draw.java index bd57d993..7a7ffca8 100644 --- a/arc-core/src/arc/graphics/g2d/Draw.java +++ b/arc-core/src/arc/graphics/g2d/Draw.java @@ -212,7 +212,7 @@ public static void color(Color color){ } public static void color(Color color, float alpha){ - Core.batch.setPackedColor(Color.toFloatBits(color.r, color.g, color.b, alpha)); + Core.batch.setPackedColor(Color.toFloatBits(color.r, color.g, color.b, Mathf.clamp(alpha))); } public static void color(int color){ @@ -244,7 +244,7 @@ public static void color(float r, float g, float b){ } public static void color(float r, float g, float b, float a){ - Core.batch.setPackedColor(Color.toFloatBits(r, g, b, a)); + Core.batch.setPackedColor(Color.toFloatBits(r, g, b, Mathf.clamp(a))); } /** Lightness color. */