I have a Polygon2D that is a square with rounded corners. I'd like to give it a simulated shadow effect and I'm thinking I can use a shader to apply a gaussian blur to the edges of an identical polygon behind it. However, all my attempts have failed and I'm having trouble finding any examples - most examples apply a blur to the background, but I want the edges of the actual polygon to blur. I'd appreciate any help in producing an example shader. Thanks!
Example of what I want (drawn in an art program):
!