I've been trying to write a fragment shader which draws a circle within a quad, by measuring the distance from the center. I've verified that my calculations are correct, and it works if I set the alpha value to 0 where I don't want pixels drawn. But if I try using discard_fragment() instead of setting the alpha to zero, then *none* of the pixels get drawn. It's like one call to discard_fragment causes all of the pixels for the entire triangle to be discarded.
That's not supposed to happen, is it? Is there a bug or am I doing it wrong somehow?
Thanks