kwin/scene-generic-vertex.glsl
Martin Gräßlin eb7d06d22f Adding a generic scene shader able to handle transformation
Currently only window transformations are supported.
2011-01-30 14:11:57 +01:00

19 lines
452 B
GLSL

#ifdef GL_ES
precision highp float;
#endif
uniform mat4 projection;
uniform mat4 modelview;
uniform mat4 windowTransformation;
// 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() {
varyingTexCoords = texCoord;
gl_Position = vertex*(windowTransformation*modelview)*projection;
}