Highlight 2d polygon border with shader
There are (at least) two possible approaches:
a) The original polygon is the dark area inside the green border, and the border is additional geometry build from extending the original polygon. The additional geometry can then be colored by standard interpolation of vertex color.
b) The polygon area reaches to the outside where the green border fades out into the background, and no additional geometry is generated. Then the vertex shader is used to compute the distance of the current pixel to the edges in screen space, and the color of the pixel is chosen as function of the distance. Obviously, you need to send a vertex attribute which is used to distinguish whether or not a vertex counts to an edge that is to be highlighted. The theory can be read in several articles around the web.