Hey you EPIC guys you!

I came up with a function that will allow you to use vertex painting to paint up to 16 different channels/layers for one material and I thought I'd share it with you guys.
One big downfall with this is that you're most likely not going to get a nice clean edge where multiple channels meet but depending on what you're doing you could manage it accordingly. I have thought of a way to clean up the blending but it will cut the number of channels down to 8, if/when I make it I'll post that one too.

In all honesty if you're getting to a complexity level where you need 16 channels in one material then I'd recommend you reconsider your design.

Let me know if anyone uses this, if it's at all useful, thoughts and if you do use it please post some screenshots.

As you can see this wall has 16 different shades on it, top pass at full colour and bottom pass at half strength:

It's a fairly simple algorithm, it's just a tree of lerps, the first column accpets the alpha of the vertex colour into the alpha of the lerp, the second accepts the blue from the vertex colour into the alpha of the lerps, third accepts the green and fourth accepts the red:

You can paint onto a mesh with the following combinations to get the different channels from your material ([RED,GREEN,BLUE,ALPHA]):

Anything not fullstrength when painting will blend the channels.

I tried to make it clear but if anyone needs any clarification just post your query.

Thanks to everyone on this forum, you guys have been good to me over the years!