diff options
author | dec05eba <dec05eba@protonmail.com> | 2021-06-12 09:01:03 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2021-06-12 09:01:03 +0200 |
commit | 6c442930ca3bef5c3e9e6a75d8aa1d93fe4eb3e1 (patch) | |
tree | af59b2cdab59fbf94b3b6e59d86d5f9154cd386f /shaders | |
parent | e705c74a8d9e3fdf6ed181b8793ad7c8c7afb75f (diff) |
Better drop shadow, smoother edge for rectangle, drop shadow for download menu
Diffstat (limited to 'shaders')
-rw-r--r-- | shaders/rounded_rectangle.glsl | 2 | ||||
-rw-r--r-- | shaders/rounded_rectangle_mask.glsl | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/shaders/rounded_rectangle.glsl b/shaders/rounded_rectangle.glsl index d06a4ba..956e28e 100644 --- a/shaders/rounded_rectangle.glsl +++ b/shaders/rounded_rectangle.glsl @@ -5,7 +5,7 @@ uniform vec4 band_color; uniform vec2 resolution; float rounded_rect(vec2 coord, vec2 size, float r) { - return length(max(abs(coord) - size, 0.0)) - r; + return smoothstep(0.0, 2.0, length(max(abs(coord) - size, 0.0)) - r); } void main() { diff --git a/shaders/rounded_rectangle_mask.glsl b/shaders/rounded_rectangle_mask.glsl index f6ff1a1..a4546e3 100644 --- a/shaders/rounded_rectangle_mask.glsl +++ b/shaders/rounded_rectangle_mask.glsl @@ -3,7 +3,7 @@ uniform float radius; uniform vec2 resolution; float rounded_rect(vec2 coord, vec2 size, float r) { - return length(max(abs(coord) - size, 0.0)) - r; + return smoothstep(0.0, 2.0, length(max(abs(coord) - size, 0.0)) - r); } void main() { |