If you stick to earlier OpenGL versions you don't even need a vertex shader. You only need a very small fragment shader:
1 2 3 4 5 6 7
| uniform sampler2D sampler; uniform float low, high;
void main(){ gl_FragColor = texture2D(sampler, gl_TexCoord[0]); gl_FragColor.a = gl_FragColor.a * (high-low) + low; } |
You can also change the high and low uniforms into constants if you don't need to be able to set them at runtime, which would make the Java code to setup the shader a little bit simpler. Well, Danny02 put it pretty well, but that's a newer GLSL version which is a bit harder for beginners.