aboutsummaryrefslogtreecommitdiff
path: root/shaders
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-06-04 19:22:04 +0200
committerdec05eba <dec05eba@protonmail.com>2021-06-04 19:22:04 +0200
commit59e4ce5c35e7e5a73d61e7111e8d4f07d63b7056 (patch)
treea8465d03cc8e6de2999c2fd22bbc83592e7ddd06 /shaders
parent31efd6ba39036291955babd900c86a897c5cbd86 (diff)
Add grid view
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