When I use UNITY_LIGHTMODEL_AMBIENT in my shader the object is rendered black, why ?
I can find a similar issue here:
http://forum.unity3d.com/threads/169896-UNITY_LIGHTMODEL_AMBIENT-doesn-t-work-in-Editor-mode
I’m trying to always use surface shaders for my shaders, so the ambient is added automatically. (And if I don’t want an ambient term in, I just use the noambient tag.)
I used * with ambient light. Now I changed it to + and it works fine.
Thx for the link.
This is not documented, but it’s possible that UNITY_LIGHTMODEL_AMBIENT is not set for shaders with certain pass tags, or it is intentionally set to zero because it shows up in the vertex or spherical harmonic lighting instead. Can you tell us a bit more about your shader, and what lighting you are setting it up for?