Material Layer Stacks (MLS) and a Global Texture that would work across all layers

I’m setting up an MLS system that heavily relies on custom masks from Substance Painter, and was wondering if there’s a way to set the mask to be global and then reference it in the layers. Currently, I am sampling it in every layer and it’s not the most convenient or performant.

I was thinking of using some throwaway material attribute in the main material (in this case clear coat) and feed the mask through that. Couldn’t get it to work though. Is there a better solution?

Im on UE 5.4.4


Thank you!

The solution was fairly straightforward. I was on the right path with feeding the texture into Clearcoat channel, i only needed to do it before the "Material Attribute Layers.