It is possible to tell the fragment shader it shouldn't write any pixel. This can be done using the "discard" statement.
This can be used - for example - to implement a color key.
Using the following texture, all red pixels should be removed (discarded!).
If you start the shader you will get the following result:
There are still some red pixels visible. This is because the texture was filtered. This can be prevented by setting the texture parameters to:
This time it looks better.