From 59e4ce5c35e7e5a73d61e7111e8d4f07d63b7056 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Fri, 4 Jun 2021 19:22:04 +0200 Subject: Add grid view --- shaders/rounded_rectangle.glsl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'shaders') 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 -- cgit v1.2.3