Cg Shader Patterns

= Multiple Pixel Lights =

Cg shaders that wish to render multiple pixel lights take the following pattern:


 * A base texture pass with the PixelOrNone tag. This pass just renders the texture without lighting and with the ambient light taken into account.
 * A pixel light pass that renders the texture and the lighting. Its easiest to do this

Unity first renders the PixelOrNone pass and then blend the Pixel passes on top of this per pixel light. You do not need to set blending modes on the pixel lighting pass, Unity automagically blends the lighting pass onto the ambient base pass.