Multiple Texture Inputs to a single Mesh and options for this

Hi Babylonians

Hoping for some direction on this material related question

We have a mesh and the customer will be able to pick the input value (albedo colour) of multiple parts of a camo pattern (5 parts)
so to give you an idea, see this video link I made as a quick concept

If we create materials we can set a single Alpha which would work for a monochromatic pattern but what I kind of need is 5 separate overlaid alpha’s for such a use case where each part of the pattern can have a separate input

Now I guess I could allow some sort of on the fly image manipulation or create a few offset meshes but none of them is appealing to us

any ideas on how we might tackle that is a simple way or if its actually possible at all


You could rebuild on the CPU side the final alpha layer by combining the alpha layers corresponding to the disabled layers and using it as the alpha channel of the albedo texture?

You could also build the alpha channel of the texture as having 1 for texels of layer 1, 2 for texels of layer 2, 4 for layer 3, 8 for layer 4 and 16 for layer 5. Then, as an input to your shader, you would pass a bitmask giving the active layers. For eg, if layers 3 and 5 should be visible, you would pass 4+16=20. After the lookup in the texture, if lookup.a & bitmask != 0 you would draw vec4(lookup.rgb, 1.0) else vec4(0.0).