aboutsummaryrefslogtreecommitdiff
path: root/shaders
diff options
context:
space:
mode:
Diffstat (limited to 'shaders')
-rw-r--r--shaders/rounded_rectangle.glsl2
-rw-r--r--shaders/rounded_rectangle_no_shadow.glsl2
2 files changed, 2 insertions, 2 deletions
diff --git a/shaders/rounded_rectangle.glsl b/shaders/rounded_rectangle.glsl
index 40babe2..92accfd 100644
--- a/shaders/rounded_rectangle.glsl
+++ b/shaders/rounded_rectangle.glsl
@@ -14,5 +14,5 @@ void main() {
float rect_dist = rounded_rect(uv - center, size, radius);
float a = clamp(1.0 - smoothstep(0.0, 1.0, rect_dist), 0.0, 1.0);
float shadow_a = clamp(1.0 - smoothstep(0.0, shadow_offset.x, rect_dist), 0.0, 1.0);
- gl_FragColor = mix(vec4(gl_Color.rgb, a), vec4(0.0, 0.0, 0.0, 0.14), clamp(shadow_a - a, 0.0, 1.0));
+ gl_FragColor = mix(vec4(gl_Color.rgb, gl_Color.a * a), vec4(0.0, 0.0, 0.0, 0.14), clamp(shadow_a - a, 0.0, 1.0));
} \ No newline at end of file
diff --git a/shaders/rounded_rectangle_no_shadow.glsl b/shaders/rounded_rectangle_no_shadow.glsl
index b12b35c..fe8b48f 100644
--- a/shaders/rounded_rectangle_no_shadow.glsl
+++ b/shaders/rounded_rectangle_no_shadow.glsl
@@ -13,5 +13,5 @@ void main() {
float rect_dist = rounded_rect(uv - center, size, radius);
float a = clamp(1.0 - smoothstep(0.0, 1.0, rect_dist), 0.0, 1.0);
- gl_FragColor = vec4(gl_Color.rgb, a);
+ gl_FragColor = vec4(gl_Color.rgb, gl_Color.a * a);
} \ No newline at end of file