Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Why do I get an error when I break my shader into passes?

Discussion in 'Shaders' started by Reverend-Speed, Oct 4, 2019.

  1. Reverend-Speed


    Mar 28, 2011
    My current shader code can be found here. I'm currently trying to break the different parts of the shader (ultimately vertex shader, triplanar, dissolve and glow) into separate passes for better hygiene and readabiliity.

    However, when I try to encapsulate everything currently in the SubShader into a pass, I get the error,

    Code (CSharp):
    1. Parse error: syntax error, unexpected TOK_PASS, expecting TOK_SETTEXTURE or '}' at line
    Can anybody help me get this shader structured correctly? How do I break this into multiple passes?

    Thanks in advance,

    Last edited: Oct 4, 2019