I want to dynamically fill areas of a material with a selection of textures based on the color of a grayscale map. I need some kind of “select” function that uses the pixel from the grayscale (0, 1, 2, 3 for example) and selects texture 1,2,3,4 accordingly as the “output-sampler”.
All I can think of is using 4 channels instead of a grayscale and use each channel as a multiplier for each of the 4 textures’ pixel color. But that would require more “mask-channels” and would result in lots of unnecessary blending, because I only ever need one of the textures at 100% for a specific point of the material.
Is that possible?