What does the "FORWARD" mean when using pass of another shader?

Hi,

In the Lighted Outline shader of unity3D pro, there’s a line:

UsePass "Toon/Lighted/FORWARD"

Since I can’t find a pass named “FORWARD” in “Toon/Lighted”, does the “FORWARD” just mean to use everything in that shader?

Thank a lot :slight_smile:

No.
The Toon/Lighted shader is a surface shader (which you can tell from the #pragma surface surf directive). What that means is that what you see when you load the Toony-Lighted.shader is not the actual CG shader itself - it is processed and compiled into various passes and subshaders depending on the particular options you specified.

To view the actual shader that is sent to the GPU, select the Toony-Lighted shader in the project and click “Open Compiled Shader” from the Inspector panel. You’ll see the FORWARD pass right at the top of the file, and you’ll also see from the tags that it is only used when “LightMode” = “ForwardBase” - i.e. that pass is used in Forward rendering, and ambient, main directional light and vertex/SH lights are applied.