How to make a shader with multiple textures, one color for each texture?
Ever played FIFA or PES, or even Need For Speed and customized your team's uniform or your car?
You select different texture patterns and they overlay each other. Then you're able to assign a color for each pattern; in that way you can customize the object with different colors and patterns.
That's exactly what I've been trying to do.
The shader must contain:
1 texture or a blank layer without a texture, which is able to be assigned a color to;
1 texture, with alpha channel, able to be assigned a color to;
1 color for the first layer;
1 color for the second layer;
It must receive lights and cast shadows.
That way, the player will be able to customize his player's shirt with different colors and patterns, as you can see on this picture:
https://image.ibb.co/hut4TQ/customshirt.jpg
The closest I got to this shader is the following:
This shader produces the result that I want, however, it doesn't receive lights, and doesn't cast shadows. I'm surprised I haven't found any shader like this, since this seems to be used in many games out there. So I'm looking for directions.