Add Border To Material

Hi, i’m trying to add a border mask to a material in order to have different textures between the center and the borders, this has to work on multiple shapes and of any size, look at the screenshots to understand better.


image this is how it should look