How to make a material mask with gradient borders?

Start here:

It will lead you to a great collection of samples, examples and methods. It’s one of my fav pieces released recently: