2010-12-04 11:31:18 +00:00
|
|
|
uniform mat4 projection;
|
|
|
|
uniform mat4 modelview;
|
2010-12-04 11:54:05 +00:00
|
|
|
uniform mat4 screenTransformation;
|
2010-12-04 11:31:18 +00:00
|
|
|
uniform mat4 windowTransformation;
|
|
|
|
|
2011-02-10 19:15:23 +00:00
|
|
|
uniform float textureWidth;
|
|
|
|
uniform float textureHeight;
|
|
|
|
|
2010-12-04 11:31:18 +00:00
|
|
|
// passed in vertex - only x and y are used
|
|
|
|
attribute vec4 vertex;
|
|
|
|
// passed in texCoords - to be forwarded
|
|
|
|
attribute vec2 texCoord;
|
|
|
|
|
|
|
|
// texCoords passed to fragment shader
|
|
|
|
varying vec2 varyingTexCoords;
|
|
|
|
|
|
|
|
void main() {
|
2011-02-10 19:15:23 +00:00
|
|
|
varyingTexCoords = texCoord / vec2(textureWidth, textureHeight);
|
2010-12-04 11:54:05 +00:00
|
|
|
gl_Position = vertex*(windowTransformation*screenTransformation*modelview)*projection;
|
2010-12-04 11:31:18 +00:00
|
|
|
}
|