Drawing Lines is Hard (2015)
mattdesl.svbtle.com
mattdesl.svbtle.com
In order to reduce the overdraw to something manageable, you need to generate geometry (via the CPU, geometry shader or vertex shader) that covers a relatively small superset of the pixels you actually want to draw.
Sure—it's trivial. Draw some bounding geometry and calculate the Euclidean distance to the line in your fragment shader. Shade accordingly.
The trick is finding that minimal bounding geometry.
I guess one could technically do something like figuring out the number of pixels spanned on CPU and then rasterizing point primitives. In your vertex shader you'd have each 1x1 pixel point figure out, in parallel, where it's supposed to go. This is of course bound to be horrendously slow and would never be practical :)