Skip to content

UI flicker on Windows in Editor with Unity 6.4 + URP RenderGraph #160

Open

Description

@WaleedAmer

Environment

  • Unity: 6.4.0f1 & 6.4.4f1
  • Render pipeline: URP (RenderGraph)
  • Platform: Windows Editor

Note: I'm aware Unity 6.4 isn't officially supported yet — filing this so it's on your radar for when it is.

Summary
A Rive component rendering into its own RenderTexture (displayed in UI) causes intermittent flickering on subsequent passes of the main camera. Disabling/removing the Rive widget eliminates the flicker immediately. Setting UniversalRenderPipelineHandler.RenderCamera explicitly to a dedicated camera (one that has no UI work scheduled after it) works around the issue.

Repro steps

  1. Unity 6.4.4f1 + URP project on Windows (DX11)
  2. Add a Rive component to a prefab that renders into a dedicated RenderTexture displayed via UI
  3. Leave UniversalRenderPipelineHandler.RenderCamera unset (defaults to Camera.main)
  4. Enter Play mode in the editor — UI flickers intermittently
  5. Disable/delete the Rive widget — flicker stops immediately

Expected: Rive renders into its target texture without affecting other passes on the main camera.
Actual: Intermittent flicker on UI rendered after Rive on the main camera. Windows/DX only — not reproducing on Mac.

Suspected cause
Rive's URP integration uses AddUnsafePass, which opts out of RenderGraph's state tracking. On Unity 6.4 / URP RenderGraph, state tracking between passes is stricter than on earlier versions. The unsafe pass appears to leave GPU state RenderGraph doesn't know about, and the next pass on the same camera inherits that state. Windows/DX-specific behavior suggests it's tied to how DX state survives across the unsafe pass boundary in a way Metal doesn't.

Workaround
Set UniversalRenderPipelineHandler.RenderCamera to a dedicated camera that has no further passes scheduled after it (in our case, the same camera already rendering the Rive target's RenderTexture). The state leak presumably still happens — it's just isolated to a camera with nothing downstream that cares.

2026-04-28.14-03-49.mp4

Activity

  1. damzobridge commented on Apr 30, 2026

    @damzobridge
    Contributor

    Thanks for reporting this and including detailed repro steps. We're looking into it, and I'll keep you updated on our progress.

  2. damzobridge commented on May 5, 2026

    @damzobridge
    Contributor

    Hello, are you able to reproduce this issue in a new/fresh project? If you are, could you share that new project with us so we can take a look?

    I've tried a few approaches, based on your repro steps, but I haven't been able to trigger this flicker on Unity 6.4.5f1 on Windows (Dx11 and 12). It's also not showing up in our test suite, so I'd like to try to narrow this down a bit more, if possible. Just in case something else in the project might be conflicting with the Rive Render Pass.

  3. WaleedAmer commented on May 7, 2026

    @WaleedAmer
    Author

    Thanks for looking into this! I will look into reproducing in a fresh project with one of my team-mates that is on Windows and has experienced the issue before.

    However, one thing I realized I left out from my initial post is that our project uses UIToolkit heavily. The Rive Widget Camera renders directly into a RenderTexture which is displayed inside of UIToolkit as an Image VisualElement

    Image
  4. damzobridge commented on May 12, 2026

    @damzobridge
    Contributor

    one thing I realized I left out from my initial post is that our project uses UIToolkit heavily

    Ah, thanks, this is important. UI Toolkit has different render timing compared to the rest of the universal render pipeline, so that could potentially lead to issues like this as UI Toolkit receives updates. We're working on an official UIToolkit integration that should avoid this issue, but I don't have a set date for release yet.

    In the meantime, your workaround is an option. We're still looking into it and I'll let you know if we find a solution in the near term that addresses it so you don't need to use the workaround anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions