Is there a shader that allows for a specular map? I know you can add a gloss map to the alpha, but I need color in my spec map for certain effects… see http://digitalnightmares.dnsalias.com/Images/Sign/St_Peters_sign_Specular.png to see what i am talking about.
There’s no built-in shader that does this. It’s possible to write a custom one. Would you need a bumpmapped version, or just specular one?
I would need a bumpmapped shader for what I am trying to do.
I more or less use this network (color + bump + colored specular) for everything, as it is extremely flexible. The other nice thing about this is that it leaves the alpha of the color channel to define either transparency/self illumination/reflectivity if one wanted to go to that length. My issue is that, unfortunately, I am a content artist and am too right brained to wrap my head around cg.
Thanks for asking Aras. I have looked at working with Unity since I went to Fullsail, and now that I have graduated, I look forward to using it to develop my life’s work
I made a bumpmap + colored specular map shader on the wiki: http://www.unifycommunity.com/wiki/index.php?title=BumpColorSpec
You are the man. Thank you so much.
Thanks for the shader but I cant seem to get it to work. It says there is an error on line 56 : type name expected at token
which is this
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
can anyone help, Id like to use this shader.
another thing Im interested in is making an alpha mask channel for this shader, so it has normal map, colour, spec and alpha. Its because Id like to use this shader on some hair which has alpha mapped edges.
- which Unity version are you using, and is it on Intel or PowerPC Mac?
- perhaps you copied the shader text from Firefox? Sometimes Firefox copies line endings in CR format, which sometimes confuses the Cg compiler.
Im using version 2.0 and Im on a slightly old G5 powerpc. Im also using firefox…how do I fix the line endings problem? what does it look like?
thanks a lot for the help.
Oh ok I tried copying and pasting from safari and it worked woohoo! now just getting alphas in there hmm.