Search Unity

DrawMeshInstancedIndirect & Soft-edge box rendering ?

Discussion in 'Shaders' started by LuyangZou, Jul 26, 2019.

  1. LuyangZou

    LuyangZou

    Joined:
    May 13, 2019
    Posts:
    3
    Hello guys,

    I'm quite new to shader.

    Here is my question:

    I used DrawMeshInstancedIndirect function and unlit surface shader to draw lots of boxes.

    Then I used computerBuffer to change the alpha of each box.

    Screenshot (171).png

    However, I want those boxes rendered in a soft-edge or volumetric style.

    What I researched so far is need to use the vertex shader to do ray tracing, but since I used GPU instancing, each vertex represents one box.

    Any idea of how can I make it more soft-edge style, I basically just don't want it looks like tons of boxes.

    Thanks