f69139e825
Shortcut is Ctrl+F6 for now. Requires shaders. svn path=/trunk/KDE/kdebase/workspace/; revision=683162
18 lines
369 B
GLSL
18 lines
369 B
GLSL
uniform sampler2D sceneTex;
|
|
uniform float textureWidth;
|
|
uniform float textureHeight;
|
|
|
|
|
|
// Converts pixel coordinates to texture coordinates
|
|
vec2 pix2tex(vec2 pix)
|
|
{
|
|
return vec2(pix.x / textureWidth, 1.0 - pix.y / textureHeight);
|
|
}
|
|
|
|
void main()
|
|
{
|
|
vec3 tex = texture2D(sceneTex, pix2tex(gl_TexCoord[0].xy)).rgb;
|
|
|
|
gl_FragColor = vec4(vec3(1.0) - tex, 1.0);
|
|
}
|
|
|