Search Unity

Bug Visual Effect performance cost stays the same regardless its playing or stopped

Discussion in 'Visual Effect Graph' started by Qriva, Jun 21, 2021.

  1. Qriva

    Qriva

    Joined:
    Jun 30, 2019
    Posts:
    1,307
    I really would like to get any comment about this "feature", is it bug? bad design? made on purpose?
    The problem is simple - whatever VFX component is emitting or not it still "renders" particles, even though there are 0 of them. Having complex graph that is currently not playing costs me almost as much as it would play all fireworks.

    Super simple example made in 2020.3.4:
    This is test VFX asset, there are literally two default systems, one produces red and other blue particles.
    graph.png
    There are 200 visual effect components on scene and when event is set to "OnPlay" the result would be like image below. The cost of 'DrawTransparentObjects' is around 2.15ms.
    effect.png
    However when event is changed to some custom event like "OnPlayCustom", the event is not triggered on awake and obviously there are no particles emmited, but the renderer still does the whole work and takes more than 1ms to "render" transparents, although there is literally nothing happening on the screen.

    profiler.png
     
  2. Qriva

    Qriva

    Joined:
    Jun 30, 2019
    Posts:
    1,307
    Someone from Unity?
     
  3. JulienF_Unity

    JulienF_Unity

    Unity Technologies

    Joined:
    Dec 17, 2015
    Posts:
    326
    Hi! This is a bug. ApplyShader should not be called. We have a fix pending for this
     
  4. Qriva

    Qriva

    Joined:
    Jun 30, 2019
    Posts:
    1,307