Search Unity

Question HDRP Lit Quad optimization

Discussion in 'Visual Effect Graph' started by Eleven18, Feb 26, 2023.

  1. Eleven18

    Eleven18

    Joined:
    Mar 25, 2017
    Posts:
    9
    Hi,
    What is the best way to optimize particles with Output Particle HDRP Lit Quad? With rate/capacity parameters = 500/1000 I have 30 FPS. When I change Output to Output Particle Quad then with the same parameters I have 60 FPS. I understand that LIT requires lighting calculations, but is there a way to optimize this? It's a simple smoke effect. I plan to have a day and night system in the project so I would prefer if the smoke reacts to the lighting.

    HDRP Lit:
    upload_2023-2-26_11-22-59.png

    Normal Quad:
    upload_2023-2-26_11-23-15.png
     
  2. JulienF_Unity

    JulienF_Unity

    Unity Technologies

    Joined:
    Dec 17, 2015
    Posts:
    326
    Hi ! The main bottleneck with smoke billboards is generally overdraw. So 500/1000 quads if they are big on screen far enough to kill performance due to overdraw. Of course the more complicated the shader, the bigger the impact on performcance. I would say for smoke system, you will generally fewer big quads (Like 10 times less). There's a debug mode in HDRP to visualize the overdraw. If the whole screen is red in your case, you have to decrease your number of particles.

    That being said, there are a few handles to optimize overdraw / per pixel cost:
    - You can use half res buffer in HDRP to render your smoke and update it (specify the pass in the output)
    - You can use octagons instead of quads for the primitive type in the output to reduce overdraw (A trade off between vertex count and pixel count)
    - There's the SimpleLit mode which has more toggle to tweak performance and is globally faster than standard lit
    - Alternatively you can use 6W lighting (Which is a new lit mode dedicated to render smoke in HDRP). We realeased a blogpost about it: https://blog.unity.com/engine-platform/realistic-smoke-with-6-way-lighting-in-vfx-graph

    Most of the optimizations technique I described here can be found in this tutorial:


    Hope this helps