Search Unity

Resolved DrawRenderers Has Broken Sorting on Transparent

Discussion in 'High Definition Render Pipeline' started by TheWanderingBen, Jan 25, 2023.

  1. TheWanderingBen

    TheWanderingBen

    Joined:
    Nov 3, 2015
    Posts:
    98
    I want to render any transparent objects into the Custom Color Buffer using a DrawRenderers Custom Pass, but even using the default Custom Pass, I get sorting issues.

    The default DrawRenderers Custom Pass:
    upload_2023-1-25_8-58-22.png

    The Custom Color Buffer output when looking at my smoke VFX:
    upload_2023-1-25_8-59-45.png

    This seems like a bug to me, but maybe I'm doing something wrong here? Would love any help!

    Unity 2022.2.1f1
    HDRP 14.0.4
    Forward Rendering
     
  2. Remy_Unity

    Remy_Unity

    Unity Technologies

    Joined:
    Oct 3, 2017
    Posts:
    703
    You are not clearing the color nor the depth buffer (Clear Flags), so it is expected to see "ghost" rendering in your buffer.
     
  3. TheWanderingBen

    TheWanderingBen

    Joined:
    Nov 3, 2015
    Posts:
    98
    Hey Remy, thanks for the response. Unfortunately that wasn't the issue. I tried clearing the all the buffers, but nothing changed.

    However, I did solve it! I needed the Custom Pass to both write depth and to write color -- unfortunately, that meant that it did a ZTest when writing color, which I didn't want it to do on the smoke particles.

    Instead, I changed to use two custom passes -- the first writes color, the second writes depth, and now it all seems sorted!
     
    Last edited: Jan 26, 2023