diff --git a/scenes/button-flat.gdshader b/scenes/button-flat.gdshader index 9d9a6089..8f0b8a18 100644 --- a/scenes/button-flat.gdshader +++ b/scenes/button-flat.gdshader @@ -11,14 +11,6 @@ uniform bool disabled = false; void fragment() { float w = cos(angle) * UV.x + sin(angle) * UV.y - speed * TIME; - if ((floor(mod(w * divisions, stripe_bias)) < 0.0001) && disabled) - { - COLOR = color_gap; - } - else - { - COLOR = color_stripe; - } + float rc = floor(float(mod(w * divisions, stripe_bias) < 0.0001)) * float(disabled); + COLOR = color_gap * rc + color_stripe * (1.0 - rc); } - -