Skip to content

Commit

Permalink
Fixed alpha clamp
Browse files Browse the repository at this point in the history
  • Loading branch information
Anuken committed Aug 7, 2024
1 parent bd12b55 commit 2a886b6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arc-core/src/arc/graphics/g2d/Draw.java
Original file line number Diff line number Diff line change
Expand Up @@ -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){
Expand Down Expand Up @@ -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. */
Expand Down

0 comments on commit 2a886b6

Please # to comment.