Search Unity

HDRP 12.1.2 GPU Instancing Grass Unity Terrain / Detail Mesh

Discussion in 'General Graphics' started by dexmex001, Mar 31, 2022.

  1. dexmex001

    dexmex001

    Joined:
    Oct 9, 2019
    Posts:
    24
    Hello Everyone!

    After my favorite grass asset not updated correctly enymore, i try create a new grass shader (moving coloring, fading ect.).
    I attach the shader graph pic, maybe someone like to use it. Its not perfect, but enogh for me XD
    Some topic read Unity basic terrain "Detai Mesh" performence enough, because it using now built in GPU instancing.
    Im using "now" 2021.2.7f1 with HDRP 12.1.2

    My problem:
    The simple shader work well /130fps
    If using Alpha Clipping its dopr some fps, but not bad /93fps
    if using Alpa Cliipping Double side, then fps reduced dramatic /70fps
    if try simple Double Side shader its runung well /130fps

    Any suggestion, how can i improve performance using Alpa Cliipping Double side?
    Maybe latest Untiy handling better Alpha clip with Double side, or better if i create a double sided mesh?
    Any ide what im doing wrong,maybe need other other settings or scrit? Im usinga simple png image as grass, no other setup on it.

    Thanks Your answare
     

    Attached Files:

    Last edited: Mar 31, 2022
    AntonioModer likes this.
  2. dexmex001

    dexmex001

    Joined:
    Oct 9, 2019
    Posts:
    24
    Hello Everyone!

    Maybe the double sided mesh solved CPU usage problem, and now GPU instancing work well.
    I created a new double sided quad mesh, and using my shader without "Double Side" option with alpha clipping.

    Now its runnig with 2Million of tris and lost only 17fps from original.

    Hope its help creating a great grass for others.
    If You have any other ideas improve "Detail Mesh" on Unity terrain please help me.
     

    Attached Files:

    Last edited: Apr 1, 2022
  3. dexmex001

    dexmex001

    Joined:
    Oct 9, 2019
    Posts:
    24
    Hello Everyone!

    The Unity update (2021.2.19f1) solved the "double sided alpha clipping" performance problem.
    Now the shader running well. 120m distance massive grass with 130fps with HDRP

    Have a nice day.
     

    Attached Files:

    Last edited: Apr 19, 2022