#ifdef GL_ES
#ifdef GL_FRAGMENT_PRECISION_HIGH
precision highp float;
#else
precision mediump float;
#endif
#endif

uniform vec2 size;
uniform mat3 uv2ndc;
uniform mat3 inverseTransform;

attribute vec2 inUV;

varying vec2 vPos;
varying vec2 vUV;

void main() {
    gl_Position = vec4(uv2ndc * vec3(inUV, 1.0), 1.0);
    vUV = (inverseTransform * vec3(inUV, 1.0)).xy;
    vPos = vUV * size;
}
