A texture uses black background for unused space, which should be filled with another color, defined in shader parameters, but other colors, that are painted on the texture, should not be altered.
So i need to make a black-white mask from this texture to simply multiply a color with it, but i fail to do it. Painted colors appear lighter or even inverted with different approaches that i used, seems like i’m missing something.
I do not want to use branching, because this shader will be the main shader in the game and it will break performance.