#version 300 es

precision mediump float;

in vec4 aPosition;
in vec2 aTextureCoord;

uniform vec4 u_uv_trans;

out vec2 v_originTexCoord;

void main() {
    gl_Position = aPosition;
    vec2 centeredCoord = aTextureCoord - vec2(0.5, 0.5);
    v_originTexCoord = centeredCoord * vec2(u_uv_trans.x, u_uv_trans.z)
    + vec2(0.5, 0.5) + vec2(u_uv_trans.y, u_uv_trans.w);
}