aboutsummaryrefslogtreecommitdiff
path: root/shaders
diff options
context:
space:
mode:
Diffstat (limited to 'shaders')
-rw-r--r--shaders/rounded_rectangle.glsl6
1 files changed, 3 insertions, 3 deletions
diff --git a/shaders/rounded_rectangle.glsl b/shaders/rounded_rectangle.glsl
index 2753383..88a057a 100644
--- a/shaders/rounded_rectangle.glsl
+++ b/shaders/rounded_rectangle.glsl
@@ -1,6 +1,6 @@
uniform float radius;
-uniform float band_y;
-uniform float band_height;
+uniform vec2 band_pos;
+uniform vec2 band_size;
uniform vec4 band_color;
uniform vec2 resolution;
@@ -15,7 +15,7 @@ void main() {
vec4 background_color = vec4(0.0, 0.0, 0.0, 0.0);
float a = clamp(rounded_rect(uv - center, size - radius, radius), 0.0, 1.0);
vec4 front_color = gl_Color;
- if(uv.y >= band_y && uv.y <= band_y + band_height)
+ if(uv.x >= band_pos.x && uv.x <= band_pos.x + band_size.x && uv.y >= band_pos.y && uv.y <= band_pos.y + band_size.y)
front_color = band_color;
gl_FragColor = mix(front_color, background_color, a);
} \ No newline at end of file