Outline flat mesh

Hello all.

I am attempting to outline a flat code generated mesh to create a spell indicator.

136776-example.png

currently every example i can find is using a shader to invert the edge normals of a mesh at a certain threshold… however seeing as all my normals are simply vertical how would i achieve an outline?

I have tried all the shaders on here: http://wiki.unity3d.com/index.php/Silhouette-Outlined_Diffuse as well as other multiple shaders and it only turns the underside of my mesh blue (which makes sense as its the inverted normal)

Any help would be greatly appreciated.

It’s actually much simpler in this case; we can follow the same logic of those shaders, but instead of expanding based on normals, we can just expand the mesh itself. Rather than using a shader, seeing as your mesh is code generated anyway, you could make a second version of the mesh that is slightly larger and below the object with your outline colour. In theory this would be done by pushing vertices away from their neighbours, but your implementation might already have a size factor to begin with.