Search Unity

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

Discussion in 'VR' started by Mikenseer, Dec 22, 2023.

  1. Mikenseer

    Mikenseer

    Joined:
    Jul 24, 2012
    Posts:
    74
    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:

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



    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:

    upload_2023-12-22_9-16-13.png

    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.
     
  2. Mikenseer

    Mikenseer

    Joined:
    Jul 24, 2012
    Posts:
    74
    Reverting from 2022.3.15f to 2022.3.6f fixed this...

    Big oof!
     
    Minos321 likes this.
  3. Minos321

    Minos321

    Joined:
    Jul 7, 2018
    Posts:
    37
    Can confirm this. Hopefully this gets fixed soon, because the project can't be built in the latest LTS.
     
  4. baggyg

    baggyg

    Joined:
    Nov 21, 2013
    Posts:
    30
    Odd, I get this same error. DX11 / 2022.3.16f but it never prevents me doing a build. VR view seems fine.
     
  5. unity-chris

    unity-chris

    Unity Technologies

    Joined:
    Nov 10, 2022
    Posts:
    29
    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.
     
  6. theloraxgirl

    theloraxgirl

    Joined:
    Jul 16, 2018
    Posts:
    9
    unity-chris likes this.
  7. Bender_R

    Bender_R

    Joined:
    May 21, 2018
    Posts:
    115
    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.
     
  8. CBHM

    CBHM

    Joined:
    Feb 12, 2019
    Posts:
    32
    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.
     
    Last edited: Jan 16, 2024
  9. nicolafern

    nicolafern

    Joined:
    Nov 20, 2020
    Posts:
    2
    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.
     
  10. nicolafern

    nicolafern

    Joined:
    Nov 20, 2020
    Posts:
    2
    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.
     
  11. CBHM

    CBHM

    Joined:
    Feb 12, 2019
    Posts:
    32
    Version 2022.3.13f1 seems to be working fine for me.