#version 150

struct m3x2
{
    vec3 r0;
    vec3 r1;
};

struct Block
{
    vec2 scale;
    vec2 pos;
};

uniform Block _block;

out vec2 vUV;
in vec2 uv;
in vec2 pos;

vec3 transform3x2(m3x2 t, vec3 v)
{
    return vec3(dot(t.r0, v), dot(t.r1, v), dot(vec3(0.0, 0.0, 1.0), v));
}

void main()
{
    vUV = uv;
    vec2 p = vec2((pos * _block.scale) + _block.pos);
    m3x2 param = m3x2(vec3(1.0, 0.0, 0.0), vec3(0.0, 1.0, 0.0));
    vec3 param_1 = vec3(p, 0.0);
    gl_Position = vec4(transform3x2(param, param_1), 1.0);
}

