2010-12-12 12:40:39 +00:00
|
|
|
uniform mat4 projection;
|
|
|
|
// offset of the window/texture to be rendered
|
|
|
|
uniform vec2 offset;
|
2010-11-14 19:49:00 +00:00
|
|
|
|
|
|
|
// passed in vertex - only x and y are used
|
2010-11-28 15:21:12 +00:00
|
|
|
attribute vec4 vertex;
|
2010-11-14 19:49:00 +00:00
|
|
|
// passed in texCoords - to be forwarded
|
2010-11-28 15:21:12 +00:00
|
|
|
attribute vec2 texCoord;
|
2010-11-14 19:49:00 +00:00
|
|
|
|
|
|
|
// texCoords passed to fragment shader
|
2010-11-28 15:21:12 +00:00
|
|
|
varying vec2 varyingTexCoords;
|
2010-11-14 19:49:00 +00:00
|
|
|
|
|
|
|
void main() {
|
2011-06-16 18:33:06 +00:00
|
|
|
varyingTexCoords = texCoord;
|
2011-03-06 08:10:21 +00:00
|
|
|
gl_Position = projection*vec4(vertex.xy + offset, vertex.zw);
|
2010-11-14 19:49:00 +00:00
|
|
|
}
|