Procedural material to blend mask

I am planning on making a procedural blend mask generator, which will control the amount of applied dirt, grunge, and rust that is placed on an object. Normally, a blend mask is simply a heightmap which the contrast has been tightened to produce stronger values of black and white and is typically saved in one of the channels, R,G,B, or A of a texture.

However, my situation is not the same case. Instead, my generated blend mask is a material, and I need the final output as a procedural texture. Is there a way I can convert a material into a procedural texture. I would really like to stay away from having to render out the material first, because then it will not be procedural.

in Eevee, there’s a shader to RGB node. There is no cycles equivalent. is the material necessary for the mask?