rive-app / rive-app/rive-unity
UI flicker on Windows in Editor with Unity 6.4 + URP RenderGraph
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 205
- Forks
- 22
- PR merge metrics
- No merged PRs in 30d
Description
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
- Unity 6.4.4f1 + URP project on Windows (DX11)
- Add a Rive component to a prefab that renders into a dedicated RenderTexture displayed via UI
- Leave
UniversalRenderPipelineHandler.RenderCameraunset (defaults to Camera.main) - Enter Play mode in the editor — UI flickers intermittently
- 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.
https://github.com/user-attachments/assets/b8193deb-8ddd-4b1f-a7c4-e690df3fc477
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue in a Unity 6.4.4f1 URP project on Windows with DX11, then trace the URP integration around AddUnsafePass and UniversalRenderPipelineHandler.RenderCamera. Compare the RenderGraph passes with and without the Rive RenderTexture widget; done means the UI no longer flickers while Rive still renders into its target texture.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, unity
- Domain
- computer-graphics, game-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100