#version 150 uniform sampler2D t0; uniform float factor = 1., threshold = 0.8; void main(void) { qgl_FragData[0].rgb = max(texelFetch(t0, ivec2(gl_FragCoord.xy), 0).rgb - vec3(threshold), vec3(0.)) * factor; }