Need Shader Help or Resources

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.

Okay, tough question!

Well, does anyone know why _WorldSpaceLightPos0 would be returning a static, unchanging value? I’ve tried adding a single light of each type to the scene and moving it around, but this value does not correctly represent the position of the light.

Is there documentation somewhere outlining these kind of ‘global’ shader variables?

I have this exact same problem. The subshader gets auto commented out as soon as I put LIGHTING_COORDS into the vertex output structure.

Any luck, faultymoose?