if ( ((gl_TexCoord[0].s > 0 &amp;&amp; gl_TexCoord[0].s < 500)) &amp;&amp; (gl_TexCoord[0].t > 0 &amp;&amp; gl_TexCoord[0].t < 500) ){
pixel = pixel - pixelPre;
}
gl_FragColor = vec4 (pixel.b, pixel.g, pixel.r, 4.0);
} I compile and run it without problems, but the modified texture has some imperfection.
The shader program read the pixel neighbour and sub it to found the vertical boundaries of the shape in the texture.
Every 128 pixel a vertical line run form the top to the bottom of my texture.