So here is what I am trying to do. Given irregular polygon (on the left) I would like to be able to create a shader that would resemble Photoshop inline glow effect with opaque fill (on the right).
Creating similar effect for 3d object I can achieve with Fresnel function. However, I am not able to do it for a flat surface of any given irregular 2d polygon.
EDIT
I am planning on using Voronoi method to generate polygons and then connecting individual polygons to territory shapes based on which player owns them. Which, then will have border material applied. What I need is effectively border (or territory) shader. That means shader has to work for more irregular shapes, like the one below.