Search Issue Tracker

Third Party Issue

Votes

0

Found in

6000.0.54f1

6000.1.12f1

6000.2.0b10

6000.3.0a2

Issue ID

UUM-111493

Regression

Yes

GameObjects are not rendered when using a fragment shader with RWStructuredBuffer in URP

-

How to reproduce:
1. Open the “IN-107509“ project
2. Open the “Main” Scene
3. Enter Play Mode
4. Observe the Game view

Expected result: GameObjects are visible
Actual result: GameObjects are not visible

Reproducible with: 2023.3.0a19, 6000.0.54f1, 6000.1.12f1, 6000.2.0b10, 6000.3.0a2
Not reproducible with: 2023.3.0a18

Reproducible on: Windows 10
Not reproducible on: macOS 15.5 (M1 Max)

Note: Reproducible with DirectX11, DirectX12 and Vulkan Graphics API

  1. Resolution Note:

    The user code in the test project uses RWStructuredBuffer (UAV) and read back the values to CPU. At startup, they call Graphics.SetRandomWriteTarget once. This assumes that nothing calls Graphics.ClearRandomWriteTargets, so before it only worked by chance. Now the RenderGraph system internally calls this function, which broke the user code.

    In order to fix it, you should call Graphics.SetRandomWriteTarget every time before calling Graphics.DrawProceduralNow. You should also call Graphics.ClearRandomWriteTargets afterwards to avoid affecting other systems.

    See documentation: https://docs.unity3d.com/ScriptReference/Graphics.SetRandomWriteTarget.html

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.