RenderTexture.Create failed: Texture is 2D but depth is set to a non-default value

When trying to run VR in playmode in editor using OpenXR on a laptop with a 1070 in it, I get this error every frame that leads to one of these Temp Buffer render textures:

RenderTexture.Create failed: Texture is 2D but depth is set to a non-default value (default is 1).
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

VR works in Builds, it worked before, it works in editor on at least 4 other PCs that have pulled this same project. I’ve tried switching from Vulkan to D11, I’ve tried tweaking camera settings, etc.

Updated drivers, reloaded project onto a fresh SSD, rebooted, restarted, re-imported. Compared all settings with the working versions on other PCs.

Tried Quest 3 with Link Cable, Air Link, Steam Link. Oculus runtime, Steam Runtime.
Also tried Quest 1 and 2.

Here’s what it looks like in VR:

It’s hard to tell from this image but you can see level geometry, it’s just washed out as if the gamma is maxed out. The left/right eyes don’t match up either. And for some reason our menu UI (a camera at a depth of 1, vs the player camera at a depth of 0) renders almost normally, though still not aligned left/right eyes.

But again, this is only busted like this on 1 PC and works on every other rig we have, both AMD and Nvidia gfx cards.

So my suspicion is there’s some tiny setting somewhere that needs toggled, or this is some jankness in the ol’ 1070 and it’s time to just retire this laptop as a workhorse. (But again… VR works on the laptop, just not in Unity editor playmode)

I’ll try a bit more to fix, but likely this will be one of those threads a future dev finds and cries alongside us.

Reverting from 2022.3.15f to 2022.3.6f fixed this…

Big oof!

1 Like

Can confirm this. Hopefully this gets fixed soon, because the project can’t be built in the latest LTS.

Odd, I get this same error. DX11 / 2022.3.16f but it never prevents me doing a build. VR view seems fine.

Hello,

This looks like an actual regression between minor versions. Please fill a bug report with the details and a sample project, so the issue can be tracked.

I created a bug report and it was replicated here for any of those on this thread: Unity Issue Tracker - "RenderTexture.Create failed: Texture is 2D but depth is set to a non-default value" error is thrown regardless of what depth value is set to

1 Like

Same issue here when trying to upgrade VR project from 2022.3.5.f1 LTS to newer 2022 LTS versions.

RenderTexture.Create failed: Texture is 2D but depth is set to a non-default value (default is 1).
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

Hopefully there will be a fix soon.

Getting “RenderTexture.Create failed: Texture is 2D but depth is set to a non-default value (default is 1).” after upgrading the project to Unity 2022.3.17f1
Gray image in the game view, when OpenXR Render Mode is set to SinglePass Instanced.
OpenXR version 1.9.1
When I try with OpenXR Render Mode Multipass I don’t get that error and get the correct game view image.

I have this same problem having upgraded my project from 2021 to 2022.3.15f1 - my videos worked fine in the 2021 release I was using. I’m going to try opening the project in 2022.3.6f to see if that fixes it. My project currently depends on videos to make narrative sense.

I just checked the bug report that theloraxgirl submitted, and it’s now saying the issue is fixed in 2022.3.18f1 so hopefully that will be out in a week or two.

Version 2022.3.13f1 seems to be working fine for me.