Simple noob shader -- need help

I know next to nothing about making shaders, but need a specific shader for my project. All I want is to make it so that specular strength for some of the shaders (for example, the bumped specular shader) is in the normal map’s alpha channel instead of the diffuse. Which brings up two simple questions:

  1. How would one achieve that? I looked through the bumped specular shader and there was nothing that stuck out that looked like it controlled that, but I am a total noob to shader editing.

  2. Is it possible to replace the built in shaders with custom ones? For example, the aforementioned bumped specular shader replacing the actual bumped specular shader that is built in?

Bump. Is this harder then I’m making this out? Because I still can’t figure out how to do this. Help me, man :frowning:

From looking through the shader code it appears to me that the specular strength in the mainTex alpha is used
through the call to SpecularLight(), which is found in ‘Unity\Editor\Data\CGIncludes\UnityCG.cginc’. This is a support function to make life easier and is used by several shaders.

To switch to using alpha in the bumpmap would require a fair amount of messing around both in the shader and UnityGC, though i’d recommended copying that function into the shader if you are going to change it.

In fact my first step might be to expand the SpecularLight() call in the shader to the actual function code from UnityCG. Then look at how to extract alpha from bumpmap instead of mainTex and use that for calculating specular strength.