In a fragment shader, I need to draw a line at a given value of u. The shader is applied to a planar polygon mesh that's being drawn in the scene with a perspective camera. (It isn't a full-screen textured quad; that would be easy!)The problem is, the thickness of the line is given in screen pixels, not in world units. How can I draw this line in my shader?The shader is Cg, but a pseudocode answer outlining the technique is fine.
How can I draw a line whose position is given in UV space and its width in screen space?
fragment shader