I am dealing with an annoying problem with my custom Specular shader. The transparency, which is driven by an Alpha texture, gets spotty with Spot light and non-existent with a Point light. But everything is fine with a Direction light. Also the more lights I add in (for fills and rims) the more opaque the transparency becomes.
My shader code is written in CG except for the pass declarations. And there are 4 transparent layers on the object to deal with culling. I am using a “lightDirT” and _SpecularLightColor0 (or _ModelLightColor0) in the code to get the Specular values.
Any ideas?
The closest similar thing I am doing that I found on the forums is with this thread: http://forum.unity3d.com/viewtopic.php?t=41131
and this answer: http://answers.unity3d.com/questions/3835/transparent-bumped-specular-on-hair
Hi, welcome to the forum!
Can you post the code for the shader?
looks like I was missing the LightAttenuation(i) on there. Since none of my lighting scenarios was using an attenuated light I did not realize it would still be necessary. Now it’s going into all my shaders 