(IN-66726) Enabling APV in URP with Render graph throws errors when ctrl is pressed in scene view.

Hi! After I enable APV in an empty URP project, I get spammed of render graph errors while trying to save an empty scene through shortcut. It is in fact the Ctrl key, when pressed while scene view is the selected window, that seems to trigger something that darken the scene and generate errors in the console. Disabling render graph will make the key work again.

The errors are along these lines :

Exception: Pass ‘Debug’ is using the legacy rendergraph API. You cannot use legacy passes with the native render pass compiler. Please do not use AddPass on the rendergrpah but use one of the more specific pass types such as AddRasterRenderPass

InvalidOperationException: The previously scheduled job ZBinningJob writes to the Unity.Collections.NativeArray1[System.UInt32] ZBinningJob.bins. You must call JobHandle.Complete() on the job ZBinningJob, before you can write to the Unity.Collections.NativeArray1[System.UInt32] safely

InvalidOperationException: Trying to use a texture (_CameraNormalsTexture) that was already released or not yet created. Make sure you declare it for reading in your pass or you don’t read it before it’s been written to at least once.

Bug report : IN-66726

5 Likes

Having the same issue with Unity version 2023.3.0a18 and 2023.3.0b9.

I got a similar issue which occurred also when pressing the Ctrl key, although my errors look different.

InvalidOperationException: Trying to SetRenderAttachmentDepth on a texture that has a color format R32_SFloat. Use a texture with a depth format instead. (pass 'DrawDepthNormalPrepass' resource '_CameraDepthTexture').
[...]
CommandBuffer: temporary render texture  not found while executing  (SetGlobalTexture)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

The error for me belongs to the “Screen Space Ambient Occlusion” found in the URP Renderer Asset when using “Depth” instead of “Depth Normals” under Quality > Source.

1 Like

No answers at all?

Same:

InvalidOperationException: Trying to use a texture (_CameraNormalsTexture) that was already released or not yet created. Make sure you declare it for reading in your pass or you don’t read it before it’s been written to at least once.

I have the same issue in Unity 6000.0.31f1.
But I don’t have any Renderer Feature’s added.
In fact, if I add “Screen Space Ambient Occlusion” (with “Depth Normals” selected), the problem goes away. I can hit CTRL with no problems…

i also have this issue using latest Unity version 6000.0.32 APV enabled with URP, with selecting Mobile in Project Settings’s Quality Levels. if i select PC there will be no errors.

first part of the error:
InvalidOperationException: Trying to SetRenderAttachmentDepth on a texture that has a color format R32_SFloat. Use a texture with a depth format instead. (pass ‘DrawDepthNormalPrepass’ resource ‘_CameraDepthTexture’).
UnityEngine.Rendering.RenderGraphModule.RenderGraphBuilders.CheckUseFragment (UnityEngine.Rendering.RenderGraphModule.TextureHandle tex, System.Boolean isDepth) (at ./Library/PackageCache/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraphBuilders.cs:386)
UnityEngine.Rendering.RenderGraphModule.RenderGraphBuilders.SetRenderAttachmentDepth (UnityEngine.Rendering.RenderGraphModule.TextureHandle tex, UnityEngine.Rendering.RenderGraphModule.AccessFlags flags, System.Int32 mipLevel, System.Int32 depthSlice) (at ./Library/PackageCache/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraphBuilders.cs:414)

Don’t know if this was fixed at some point, but it’s present in 6000.0.32. Every time ctrl is pressed, I get this error.

InvalidOperationException: Trying to SetRenderAttachmentDepth on a texture that has a color format R32_SFloat. Use a texture with a depth format instead. (pass ‘DrawDepthNormalPrepass’ resource ‘_CameraDepthTexture’).

Followed by

InvalidOperationException: The previously scheduled job ZBinningJob writes to the Unity.Collections.NativeArray1[System.UInt32] ZBinningJob.bins. You must call JobHandle.Complete() on the job ZBinningJob, before you can write to the Unity.Collections.NativeArray1[System.UInt32] safely.

1 Like

I just hit this issue myself while working on another Unity bug. I filed a new bug about the problem.

While you wait for a fix, one (slightly annoying) work-around is to simply add the Screen Space Ambient Occlusion Renderer Feature in your URP settings asset (in the Renderer Features section). At least that worked in my case.

1 Like

That screen AO indeed ‘fixes’ it… which is weird… But thanks, it will have to do for now!

I did not have this issue with 6000.0.27f1… I might revert back to that actually. So if this is an old bug, it seems to come and go?

Same here… What is this issue. Should i downgrade my project’s Unity version?

Having the same issues in all versions of unity 6 that I’ve tried up until 6000.0.32f1. Not only will this error come up, at the same time, everything in the scene view disappears until you lose ctrl. Using an SSAO renderer feature solved this issue. I had to create one and add it to the project settings solely for the editor.

Same issue. Another workaround is to set depth priming mode to Forced in the URP renderer asset.
If MSAA is enabled, it says that depth priming is not supported, so it maybe doesn’t even change anything compared to enabling the renderer feature?

@rasmusn Can I find the bug report somewhere to check when it is solved?

@daniel414 It seems this bug report is not marked public in our system and therefore I cannot give you a publicly available link to it.

But I can tell you that a colleague of mine has now fixed this bug so I believe the fix should be part of the next point release.

That’s great to hear, thanks for the update!

Just documenting here that this is happening to me when targeting android and using the “render objects” renderer feature in my URP renderers

thanx,solved on unity 6.2 alpha