I am experimenting with fragment shaders that modify polygon shape by selectively discarding fragments, I am using texture coords to compute the position of the fragment inside a quad.
While this might not be the best method for what I want to do, this example code might behave correctly, that is discard some fragments at the left/right of the quad, and color it depending on viewing angle:
This looks really strange at first sight indeed… Have you tried to set angle with the value 0.5 in the first code snippet? Maybe something occurs badly in the normalization, but I don’t think so.
Try to downlaod the cg compiler from the nivia developers site, and compile it using various profiles, like the arbfp1 to see if your fragment shader code comply with the arb.
So…the compiler doesn’t really support it on some hardware. Does it at least give a warning in the info log? If it doesn’t at least do that, I’d still submit a bug report.