mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-28 22:41:43 +00:00
21 lines
455 B
GLSL
21 lines
455 B
GLSL
#version 420 core
|
|
|
|
#include "common.vert.glsl"
|
|
#include "rect.vert.glsl"
|
|
|
|
layout(location = 0) in vec4 inRect;
|
|
layout(location = 1) in vec4 inTexRect;
|
|
|
|
layout(location = 0) out vec2 outPos;
|
|
layout(location = 1) out flat Rect outRect;
|
|
layout(location = 2) out vec2 outTexCoord;
|
|
|
|
void main() {
|
|
Rect r = rect_from_gsk (inRect);
|
|
vec2 pos = set_position_from_rect (r);
|
|
|
|
outPos = pos;
|
|
outRect = r;
|
|
outTexCoord = scale_tex_coord (pos, r, inTexRect);
|
|
}
|