//#version 110
//
//
//uniform sampler2DRect inputTex;
//uniform int texCoordSet;
//
//attribute vec3 vsPosition;
//attribute vec2 vsTexture;
//attribute vec2 vsTexture2;
//
//varying vec2 fsTexture;
//
//void main()
//{
//    gl_Position=vec4(vsPosition.x,-vsPosition.y,0.,1.0);
//    fsTexture = vsTexture*vec2(3840.,2160.);
//    if(texCoordSet==1)
//    {
//        fsTexture=vsTexture2*vec2(3840.,2160.);
//    }
//}

#version 330


uniform sampler2DRect inputTex;
uniform int texCoordSet=1;

layout (location=0) in vec3 vsPosition;
layout (location=1) in vec2 vsTexture;

out vec2 fsTexture;
out vec2 fsTextureNormalized;

void main()
{
    ivec2 textureSize2d;
    textureSize2d=textureSize(inputTex);
    gl_Position=vec4(vsPosition.x,vsPosition.y,vsPosition.z,1.0);
    fsTextureNormalized=vsTexture;
    fsTexture = vsTexture*vec2(textureSize2d);
}

