summaryrefslogtreecommitdiff
path: root/shaders/ui.vert.glsl
diff options
context:
space:
mode:
Diffstat (limited to 'shaders/ui.vert.glsl')
-rw-r--r--shaders/ui.vert.glsl6
1 files changed, 6 insertions, 0 deletions
diff --git a/shaders/ui.vert.glsl b/shaders/ui.vert.glsl
index d23b609c..c1779add 100644
--- a/shaders/ui.vert.glsl
+++ b/shaders/ui.vert.glsl
@@ -19,12 +19,17 @@ layout(location = 5) in vec4 a_present_rect;
// the id is what is left below them; integer transport preserves the exact
// cross-backend hash.
layout(location = 6) in uvec4 a_effect;
+// A clip rectangle in target pixels (x0, y0, x1, y1): the fragment shader
+// drops what lies outside it. x1 < x0 is none. A vertical transition clips
+// its pane's instances to the box the pane is growing into.
+layout(location = 7) in vec4 a_clip;
layout(location = 0) out vec2 v_uv;
layout(location = 1) out vec3 v_fg;
layout(location = 2) out vec3 v_bg;
layout(location = 3) out vec2 v_cell_uv;
layout(location = 4) flat out uvec4 v_effect;
+layout(location = 5) flat out vec4 v_clip;
void main() {
vec2 pos;
@@ -70,5 +75,6 @@ void main() {
v_fg = a_fg;
v_bg = a_bg;
v_effect = a_effect;
+ v_clip = a_clip;
gl_Position = vec4(pos, 0.0, 1.0);
}