Rounded edges for group of instances using same material.

Is it possible to have a material that defines the rounded edges for the group of instances?

rounded corners.png

The red squares are static mesh instances(planes?). The blue corners are what i want to achieve.

So is it possible to just slap in a material and have it define the look of rounded edges?

If it is possible, please throw me some life line.