Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

How to use GrabPass in DrawProcedural?

Discussion in 'Shaders' started by vladstorm_, Jan 18, 2018.

  1. vladstorm_

    vladstorm_

    Joined:
    Nov 26, 2013
    Posts:
    184
    I use Surface Shader to render geometry generated with Compute Shader.
    I draw geometry from vertex buffer using DrawProcedural.
    I wanna make surface semi-transparent. I read I have to use GrabPass to get texture behind my material. It works on static meshes but doesnt work on my generative mesh.

    How can I use GrabPass or how can I get texture behind my material when and I use DrawProcedural?


    I have this weird error dont know what it means
    Code (CSharp):
    1. Parse error: syntax error, unexpected TOK_PASS, expecting TOK_SETTEXTURE or '}'
     
    Last edited: Jan 18, 2018
  2. Invertex

    Invertex

    Joined:
    Nov 7, 2013
    Posts:
    1,539
    Given this is a syntax error, it would be helpful to see your shader code.