I’m having heaps of trouble with shaders. There really isn’t much out there besides the official documentation, which I’ve read over and over, but it hasn’t helped me a great deal.
I’m trying to manually control how light interacts with the surface. I’ve tried using the #pragma line to define a custom lighting model, but I need the light model data in the fragment shader, as it interacts with color in a non-standard manner.
The most promising thing I found was this:
http://unity3d.com/support/documentation/Components/SL-Attenuation.html
However, when I attempt to use that code as a base to experimenting, Unity comments out the entire SubShader component with the message:
Are there any good Unity-related shader resources out there? I’ve found a few example shaders which I’ve read over, but nothing that really helps me.