2019-03-28 03:59:54 +00:00
|
|
|
#version 300 es
|
|
|
|
|
2021-08-03 00:45:47 +00:00
|
|
|
layout(location = 0) in vec2 vertex;
|
2019-03-28 03:59:54 +00:00
|
|
|
out highp vec2 uv;
|
|
|
|
|
2021-08-09 04:08:10 +00:00
|
|
|
uniform highp vec2 size;
|
2021-08-03 00:45:47 +00:00
|
|
|
uniform mat3x2 transform;
|
|
|
|
|
2019-03-28 03:59:54 +00:00
|
|
|
void main()
|
|
|
|
{
|
2021-08-09 04:08:10 +00:00
|
|
|
highp vec2 uvScale;
|
|
|
|
|
2021-08-03 00:45:47 +00:00
|
|
|
gl_Position = vec4(transform * vec3(vertex, 1.0), 0.0, 1.0);
|
2021-08-09 04:08:10 +00:00
|
|
|
uvScale.x = 1.0 / size.x;
|
|
|
|
uvScale.y = 1.0 / size.y;
|
2021-08-03 00:45:47 +00:00
|
|
|
uv = vertex * uvScale;
|
2019-03-28 03:59:54 +00:00
|
|
|
}
|