2023-06-08 09:00:18 +00:00
|
|
|
#version 450
|
2017-01-01 22:47:53 +00:00
|
|
|
|
2023-05-15 00:25:41 +00:00
|
|
|
#include "common.vert.glsl"
|
|
|
|
#include "rect.vert.glsl"
|
2017-01-17 01:20:08 +00:00
|
|
|
|
2017-01-01 22:47:53 +00:00
|
|
|
layout(location = 0) in vec4 inRect;
|
|
|
|
layout(location = 1) in vec4 inTexRect;
|
2023-06-28 18:50:43 +00:00
|
|
|
layout(location = 2) in uint inTexId;
|
2017-01-01 22:47:53 +00:00
|
|
|
|
|
|
|
layout(location = 0) out vec2 outPos;
|
2023-05-15 00:25:41 +00:00
|
|
|
layout(location = 1) out flat Rect outRect;
|
|
|
|
layout(location = 2) out vec2 outTexCoord;
|
2023-06-28 18:50:43 +00:00
|
|
|
layout(location = 3) out flat uint outTexId;
|
2017-01-01 22:47:53 +00:00
|
|
|
|
|
|
|
void main() {
|
2023-05-15 00:25:41 +00:00
|
|
|
Rect r = rect_from_gsk (inRect);
|
|
|
|
vec2 pos = set_position_from_rect (r);
|
2017-01-01 22:47:53 +00:00
|
|
|
|
|
|
|
outPos = pos;
|
2023-05-15 00:25:41 +00:00
|
|
|
outRect = r;
|
|
|
|
outTexCoord = scale_tex_coord (pos, r, inTexRect);
|
2023-05-20 00:56:02 +00:00
|
|
|
outTexId = inTexId;
|
2017-01-01 22:47:53 +00:00
|
|
|
}
|