Search Unity

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

    Reverend-Speed

    Joined:
    Mar 28, 2011
    Posts:
    284
    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,

    --Rev
     
    Last edited: Oct 4, 2019