Changing a Color on A Texture Using ShaderForge

marcosecchi Tutorials, Unity3D 0 Comments

Lately I’ve been messing around with ShaderForge (I’m not a shader guru and this tool is just so easy to learn…) as I needed to quickly change colors on some models on a scene.

The shader had to be a bit clever as I had to select the theme color from a texture in a low poly environment, but not so much as the textures were quite easy and flat.

So, after messing around a bit with some nodes, I came up with the following result:

Color Replacement

Pic. 1 – The replaced color

As you can see, you can select a color from the texture and the color replacement. I also added a tolerance slider to tweak out the selected areas, and a brightness slider (sometimes the color replacement result is too dark or too bright).

Below you can find the nodes screenshot (click on the image to see it fullsize):

Shaderforge Color Replacement

Pic. 2 – The Shaderforge nodes