Доработка. Зачёркивание кнопок более красивое
This commit is contained in:
@@ -46,10 +46,16 @@ void fragment()
|
||||
COLOR.a = 0.0;
|
||||
for (float x = -2.0; x < 2.0; x += 0.03)
|
||||
{
|
||||
float v0 = smoothstep(-1.0, 1.0, (tx - UV.x + x) * sharpness + width);
|
||||
float v1 = smoothstep(-1.0, 1.0, (UV.x - tx - x) * sharpness + width);
|
||||
float v0 = smoothstep(0.0, 1.0, (tx - UV.x + x) * sharpness + width);
|
||||
float v1 = smoothstep(0.0, 1.0, (UV.x - tx - x) * sharpness + width);
|
||||
float v2 = smooth_px(length(UV.x - center.x), center.x * 2.0 - ds, ds);
|
||||
COLOR.a += v0 * v1 * v2;
|
||||
vec2 uv = UV;
|
||||
rotate_vec2(uv, -rotation, center);
|
||||
float v3 = smoothstep(0.0, 1.0, (uv.x - center.x / 5.0) * sharpness);
|
||||
float v4 = smoothstep(0.0, 1.0, (uv.y - center.y / 5.0) * sharpness);
|
||||
float v5 = smoothstep(0.0, 1.0, (center.x * 2.0 - center.x / 5.0 - uv.x) * sharpness);
|
||||
float v6 = smoothstep(0.0, 1.0, (center.y * 2.0 - center.y / 5.0 - uv.y) * sharpness);
|
||||
COLOR.a += v0 * v1 * v2 * v3 * v4 * v5 * v6;
|
||||
}
|
||||
COLOR.a *= color.a;
|
||||
}
|
||||
@@ -91,6 +97,7 @@ script = ExtResource("1_ui6sg")
|
||||
toggle_mode = true
|
||||
|
||||
[node name="state" type="NinePatchRect" parent="."]
|
||||
modulate = Color(1, 1, 1, 0.25)
|
||||
layout_mode = 2
|
||||
texture = ExtResource("2_0cn5u")
|
||||
patch_margin_left = 10
|
||||
|
||||
Reference in New Issue
Block a user