Search Unity

DrawRenderers custom pass + Lit with alpha cutout?

Discussion in 'High Definition Render Pipeline' started by ViCoX, Mar 9, 2020.

  1. ViCoX

    ViCoX

    Joined:
    Nov 22, 2013
    Posts:
    37
    Hi,

    Is it possible to get the Lit Graph / PBR Graph to work with alpha cutout in DrawRenderers Custom Pass?
    If I use Unlit shader like in the examples I can get it to work but not with the Lit graph. Otherwise when pass is set to Forward with Lit it renders fine.

    Anyways the custom pass system is big improvement - it was f**king annoying to do anything custom with HDRP! Kudos to team!

    Cheers,
    - J
     
  2. antoinel_unity

    antoinel_unity

    Unity Technologies

    Joined:
    Jan 7, 2019
    Posts:
    262
    Hello,

    It should be possible to render Lit objects with alpha clip in custom passes with the DrawRenderers custom pass, just make sure to override the depth test if your objects have been excluded from camera culling flags like so:
     

    Attached Files:

  3. YOSHIDA-Shinya

    YOSHIDA-Shinya

    Joined:
    Dec 18, 2013
    Posts:
    11
    Hi, I can't make this work.
    In DrawRenderers custom pass, Lit shaders with alpha clipping renders no alpha clipped (opaque) faces.
    I have tried overriding the depth test.
     
  4. mgeorgedeveloper

    mgeorgedeveloper

    Joined:
    Jul 10, 2012
    Posts:
    324
    Since this thread is still alive and it seems I made a duplicate bug report, I will link it here:

    https://forum.unity.com/threads/dra...a-clipping-if-used-with-a-lit-shader.1378026/

    It seems to be a bug, but I got no reply to my other thread.
     
  5. YOSHIDA-Shinya

    YOSHIDA-Shinya

    Joined:
    Dec 18, 2013
    Posts:
    11
    Your detailed report really helps. Quite same as the trouble that I have!