#version 120

uniform sampler2D texture;
uniform float opacity;

void main()
{
    vec4 pixel = texture2D(texture, gl_TexCoord[0].xy);
    vec4 color = gl_Color * pixel;
    color = vec4(1.0, 1.0, 1.0, color.a)*opacity + (1.0-opacity)*color;
    gl_FragColor = color;
}