I am wondering if there is any colored specular shader out there for Unity (specular map as colored specular texture in RGB mode not grayscale). If so i would be happy if someone could give me link for it. Also if anyone is using it i would like to know if this shader is optimised and it does not ruin performance too much, considering that it will be used on every model.
Also is Strumpy Shader Editor able to use colored specular maps? Is this shader editor optimised comparing to original Unity shaders? If not of what performance drop are we talking about?
This has some things simplified (i.e. specular power is hardcoded). Should be easy to add full capabilities of built-in specular shader, just with a colored gloss map.
Thanks for help Arash, however i am not a programmer and i have no idea where do i need to put shader code to get it work or how to create shader in Unity.
Copy / paste into a new text file,
then save as “ColoredSpecular.shader”
then drag and drop the file into your project explorer.(unity)
then create newMaterial and , into the inspector select your shader (./Surface/Colored Specular)
The built-in BlinnPhong lighting model declares _SpecColor outside the SurfaceOutput structure, as a uniform value. This means that you have to re-write the lighting model as Aras did in order to use a texture.
thanx Aras and gaustwick for this shader! and thx janpec for bring up this topic! im working on a game with alot of sci fi materials, and the default unity bump specular doesnt show the normal mapped effects well at all! this one is much better! its very similar to the Maya Blinn shader than i am used to, awesome job guys! xD
I was asked for a version of this shader that supported illumination maps, so I had a go, and added shininess and global colour parameters whilst I was there The illumination map needs to be stuck in the specular map’s alpha channel.
The posted shaders are all very helpful for a school project that I am currently working on, thank you for the hard work all of you! ^^
I have one thing that is missing from these shaders that would make it perfect for me, I have another regular shader that forces two-sided rendering(turns off culling). I’ve made attempts at combining the two shaders however they just don’t seem compatable in any way(the double sided shader uses passes, while this shader doesn’t. not sure on the specifics behind each, but neither seemed to work in the other >.>).
The character I’m attempting to use this on has flat geometry that can be seen from both sides(cloak/ect.) and I would love to be able to use the colored specular shader with the double sided geometry if possible.
I have been trying for the last 2-3 hours with no success, how can I add Cutout with Cull Off to this Shader that you guys have come up with? BTW this is great and I am exited to be able to use!
This is what I am using, no Normals or Specularity do.
Attempting to use gaustwick’s Colored Specular Bumped shader that i pulled from this thread, but the object seems to be rendering much darker than when using other shaders. Is this normal?
A 90% white object is rendering a very dark grey color, other than that it seems to work great. When using the shader with added illumination included, the objects renders much more like it should. Any ideas as to what is causing this, or how to fix it? Should I just edit the shader w/ illumination and remove that property?