1 Shader but multiple colours?

Hi

Im working on a puzzle type game where I need to have objects of matching colours.
THe objects each have texture maps, but I want to adda colour multiple or hue shift to them so those that are related have the same colour (red, blue,yellow, white etc)

Is there a way to do this that I can still have one shader on all the pieces, but each object has a variable which when changed updates its colour some how? Maybe the shader can hook into it to read the colour mult or hue shift value?

I’d prefer to do this than have multiple prest shaders of colours that it swaps between (but will do it this way if only option)

Thanks

-LW

you can use one shader on all of them, just assign it in each of their materials.

But you can not have one material due to the different textures.

You can use a shader that utilizes vertex colors, however, in order to use one material. Unity doesn’t come with it though.

Thanks for the info (I prob should have posted to shader forum)

So is it not possible to have an attribute on a GO:
eg

public Color m_myColorMult = Color.red; (forgive syntax Im at work)

And then have the shader look for this attribute and apply mult etc per GO?

-P