kwin/effects/coverswitch/coverswitch-reflection.glsl
Martin Gräßlin ad070909a3 Reflection plane in Coverswitch and GLES
CoverSwitch uses new concept of combining a custom fragment shader with the
built-in generic vertex shader. This shader is used to render the reflection
plane on top of the reflected windows.
The fragment shader uses two uniform colors for front and back and interpolates
between them based on the texcoords (which are not used for texture lookup).
The reflection plane vertices could be buffered.
2011-01-30 14:12:02 +01:00

9 lines
193 B
GLSL

uniform vec4 u_frontColor;
uniform vec4 u_backColor;
varying vec2 varyingTexCoords;
void main()
{
gl_FragColor = u_frontColor*(1.0-varyingTexCoords.s) + u_backColor*varyingTexCoords.s;
}