uniform mat4 mvpMatrix;
uniform mat4 transformationMatrix;
uniform vec2 texCoordScaling;

attribute vec4 position;
attribute vec2 texCoords;

varying vec2 pass_TexCoords;

void main() {


    vec2 scale = vec2(1.0, 1.0);
    if(texCoordScaling.x != 0.0)
        scale.x = texCoordScaling.x;
    if(texCoordScaling.y != 0.0)
        scale.y *= texCoordScaling.y;

    vec4 transformatedPosition = transformationMatrix * position;
    gl_Position = mvpMatrix * transformatedPosition;
    pass_TexCoords = scale * texCoords;

}