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

Question Transparent Issue with Graphics.DrawMeshInstanced

Discussion in 'General Graphics' started by ahmaderfani12, Jan 10, 2022.

  1. ahmaderfani12

    ahmaderfani12

    Joined:
    Nov 16, 2017
    Posts:
    3
    I have been working on a system that uses 'Graphics.DrawMeshInstancedProcedural' to generate many meshes. Everything is OK except for the issue with the transparent shaders. When I set the shader(shader graph) surface to transparent the orders get messed up. I used a technique with ForwardRenderer:


    with that the orders are Ok but some new issue appears on transparent parts:

     
    Last edited: Jan 10, 2022
  2. ahmaderfani12

    ahmaderfani12

    Joined:
    Nov 16, 2017
    Posts:
    3
    OK, I found it :) just use Alpha Clipping(threshold) to prevent rendering those areas.