#version 300 es
precision mediump float;

uniform vec2 uCanvasSize;
uniform vec2 uLocation;
uniform float uScale;

in vec2 vertexPosition;

void main() {
    vec2 finalVertexPosition = vertexPosition * uScale + uLocation;
    vec2 clipPosition = (finalVertexPosition / uCanvasSize) * 2.0 - 1.0;

    gl_Position = vec4(clipPosition, 0.0, 1.0);
}