- Home /
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 ^_^
Answer by tanoshimi · Mar 03, 2015 at 01:17 PM
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.
Your answer

Follow this Question
Related Questions
2nd Directional light 0 Answers
Using a particular pass in a multipass shader 0 Answers
How do I find the index of a shader pass 2 Answers
Unity shaders - How can I loop a pass 0 Answers
Layering textures on top of eachother with dynamic positioning 1 Answer