This is my first time working with shaders in Unity. I’m trying to modify the Decal shader that comes with Unity. I want the main color to modify the base texture, but the decal stays the same. The way the shader is currently written, if you were to set the color to red, the decal gets tinted red, too. I want the base texture to get tinted, but the decal to stay the same.
How would I do something like that? Thanks in advance.
So there are two changes here. First I moved where you blend the main color property with the end color. Instead of doing it at the end of the blending, I do it before lerping the decal color. This will allow the color to tint the main texture / vertices. while (mostly) preserving the color for the decal.
So now the second change. in the lerp, I scale back the color from the decal. For some reason, tinting the color before the lerp caused the colors from the decal to be very blown out. So it has a bloom-ish effect to the colors. So scaling them back to a quarter seems to have brought the colors back to a proper range.
If you have any suggestion for improvements, please feel free to reply. It feels like my solution is a bit unclean.