How to blend between two materials

Sorry for my previous answer which was out of the scope of your question. But it’s not possible to use custom data for that ? Like describe in this link ?