Yes. Just remove the rounding from the end, and make it grayscale. Then this can be the input of the shader. A little bit of math will be needed to make it filling only the half of the path (as on your example), and to make it moving along the line. I can write down the steps of the shading once I get home.