/**
 * Copyright © 2010-2011 Kirill Gavrilov <kirill@sview.ru>
 *
 * Distributed under the Boost Software License, Version 1.0.
 * See accompanying file license-boost.txt or copy at
 * http://www.boost.org/LICENSE_1_0.txt
 */

uniform mat4 uProjMat;
uniform mat4 uModelMat;
uniform vec4 uTexData;
uniform vec4 uTexUVData;

attribute vec4 vVertex;
attribute vec2 vTexCoord;

varying vec2 fTexCoord;
varying vec2 fTexUVCoord;

void main(void) {
    fTexCoord   = uTexData.xy   + vTexCoord * uTexData.zw;
    fTexUVCoord = uTexUVData.xy + vTexCoord * uTexUVData.zw;
    gl_Position = uProjMat * uModelMat * vVertex;
}
