A simple shader that creates an outline around a sprite.
I’ve been making vector art and needed a way to add stroke to my shapes inside of Unity. What better way than to write your own shader?
How it Works
Vertex shader extends the vertices outwards while the texture stays in the center allowing space for the outline. Dynamic batching is disabled because when the mesh is batched the vertices will be scaled up from the center of the world instead of the center of the sprite.