Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Bug Metal: Particle System glitches when rendering another ParticleSystem to offscreen RenderTexture

Discussion in 'Universal Render Pipeline' started by chrismarch, Jun 25, 2020.

  1. chrismarch

    chrismarch

    Joined:
    Jul 24, 2013
    Posts:
    465
    When I have Particle System "A" only rendering with my main camera, it glitches out, often to the point of a fullscreen cross, when I am also rendering a Particle System "B" only to another camera that targets a separate render texture. This bug seems easiest to reproduce when the Particle Systems use the Trails module. Any idea what is going on here?

    Bug occurs on Mac and iOS devices (A7, A9), but not in play mode in the editor.
    Unity 2019.3.15f1 Metal, URP 7.3.1
    Unity 2019.4.1f1 Metal, URP 7.3.1

    EDIT: also occurs in Mac standalone with Graphics API Metal, but not OpenGLCore
     
    Last edited: Jun 27, 2020
    eelstork likes this.
  2. chrismarch

    chrismarch

    Joined:
    Jul 24, 2013
    Posts:
    465
    The problem seems to go away if I enable Graphics Jobs. Without Graphics Jobs, it seems to be linked to low performance situations, like when I am running a standalone build and I am also building lighting in the editor.
     
  3. michaeltepl

    michaeltepl

    Joined:
    Dec 26, 2013
    Posts:
    22
    Hi! I have the same issue on Android using Vulkan API, but with OpenGLCore everything is ok. With LWRP it also worked fine
     
    chrismarch likes this.
  4. m-pire

    m-pire

    Joined:
    Jul 12, 2019
    Posts:
    6
    Perfect that also seems the solution to my problems.
    Even if i dont even know what it exactly does.
     
    chrismarch likes this.
  5. chrismarch

    chrismarch

    Joined:
    Jul 24, 2013
    Posts:
    465
    Great. I'm glad it works for you too.
    I tried many things while trying to unsuccessfully make a small test case to submit to unity. Once I saw that a heavy CPU load could cause the particles to stretch across the screen (when also rendering other particle to a RT), I thought the Graphics Jobs might work, by offloading the particle setup work from the main CPU, that is getting overloaded, to other cores, which is the theme of Graphics Jobs.
     
  6. CChong_at_Infinity

    CChong_at_Infinity

    Joined:
    Apr 7, 2020
    Posts:
    23

    Did you manage to file a bug report, chrismarch?

    I believe I'm experiencing the same issue. We are doing a very UI-heavy game and have almost everything rendering exclusively to render targets. And we're also seeing this issue with particles glitching out into big white flashes on Metal (Mostly iOS though we have seen the particles glitching in the Editor scene window occasionally).

    We're using Unity 2019.3.0f6 with URP 7.2.1

    FYI, enabling the graphics jobs did make the glitching go away, but we ended up getting other weird rendering bugs (e.g. skinned characters missing their faces, as well as crashes).

    Did you end up with stability and/or other rendering issues too?

    EDIT: Another way I've gotten around the issue is by turning multi-threaded rendering off (and not using graphics jobs either).
     
    Last edited: Jul 17, 2020
    chrismarch likes this.
  7. chrismarch

    chrismarch

    Joined:
    Jul 24, 2013
    Posts:
    465
    Hello,

    Yes I opened a ticket a couple weeks ago.
    The bug is no longer reproducible in "trunk" as of July 8th, and there was a ticket to backport to 2019.4.
    I don't have an issue tracker link for this issue unfortunately, but I suppose it should be fixed in the latest 2020 beta.

    Thanks for the tip with multi-threaded rendering.
     
    CChong_at_Infinity likes this.
  8. CChong_at_Infinity

    CChong_at_Infinity

    Joined:
    Apr 7, 2020
    Posts:
    23
    Oh, terribly sorry. I didn't realise you replied.

    Thanks for opening the ticket.

    BTW, any idea if it's been / being fixed in 2019.4?
     
    Last edited: Sep 23, 2020
  9. chrismarch

    chrismarch

    Joined:
    Jul 24, 2013
    Posts:
    465
    No ETA, I guess there is a long backlog of backports
     
    kmedved and CChong_at_Infinity like this.
  10. kmedved

    kmedved

    Joined:
    Aug 18, 2016
    Posts:
    187
    Have the same issue with Unity 2019.4.14f1, tried to use only OpenGLES2, OpenGLES2+OpenGLES3, OpenGLES2+GraphicsJobs, OpenGLES2/OpenGLES3+GraphicsJobs, but still unsuccessfully
     
    chrismarch likes this.
  11. CChong_at_Infinity

    CChong_at_Infinity

    Joined:
    Apr 7, 2020
    Posts:
    23
    There seemed to be a bug related to this that was address in 2019.4.13f1:

    Particles: Fixed uninitialized compute buffer access when using particle quads and gfx jobs (1274445)​

    Haven't actually tested this myself yet.
     
    eelstork likes this.
  12. XingyunZou

    XingyunZou

    Joined:
    Mar 12, 2021
    Posts:
    1