Painting 12 textures in a single mesh is bad. Period.
why don’t you just use an external 3d program to paint the object as you need / do you really need to be able to paint 1w textures on a single object at runtime?
its a bit past ridiculous.
frac and mod can help return integers/hard masks.
The base idea here is that you take the R from vector paint and you section it off. You can also use an IF statement.
values above X will display texture A, values below Texture B, values equal texture C.
Thats 3 texture per channel.
3x3 is 9, so that’s 9 textures you can use off r g b with IF nodes.
add 3 from alpha and you got your 12.
More than that, use more IFs. Performance will be bad regardless.