4fa09b63b4
Btw caps of cylinder and sphere are working correctly again. svn path=/trunk/KDE/kdebase/workspace/; revision=925809
24 lines
671 B
GLSL
24 lines
671 B
GLSL
uniform sampler2D winTexture;
|
|
uniform float windowWidth;
|
|
uniform float windowHeight;
|
|
uniform float opacity;
|
|
uniform float front;
|
|
|
|
vec2 pix2tex(vec2 pix)
|
|
{
|
|
return vec2(pix.x / windowWidth, pix.y / windowHeight);
|
|
}
|
|
|
|
void main()
|
|
{
|
|
if( front > 0.0 && gl_FrontFacing )
|
|
discard;
|
|
if( front < 0.0 && !gl_FrontFacing )
|
|
discard;
|
|
// remove the shadow decoration quads
|
|
if( gl_TexCoord[0].x < 0.0 || gl_TexCoord[0].x > windowWidth ||
|
|
gl_TexCoord[0].y < 0.0 || gl_TexCoord[0].y > windowHeight )
|
|
discard;
|
|
gl_FragColor.rgba = texture2D(winTexture, pix2tex(gl_TexCoord[0].xy)).rgba;
|
|
gl_FragColor.a = gl_FragColor.a * opacity;
|
|
}
|