Files
kovidgoyal-kitty/kitty/rounded_rect_vertex.glsl
Kovid Goyal 4fd84ac5ea Improve rendering of hyperlink hover popups
Now they are rendered in default bg/fg with a rounded rectangle
border.
2025-08-14 08:30:28 +05:30

18 lines
374 B
GLSL

#define left 0
#define top 1
#define right 2
#define bottom 3
const ivec2 vertex_pos_map[4] = ivec2[4](
ivec2(right, top),
ivec2(right, bottom),
ivec2(left, bottom),
ivec2(left, top)
);
const vec4 dest_rect = vec4(-1, 1, 1, -1);
void main() {
ivec2 pos = vertex_pos_map[gl_VertexID];
gl_Position = vec4(dest_rect[pos.x], dest_rect[pos.y], 0, 1);
}