Search Unity

Bug Terrible Render Texture URP Performance (2022.2)

Discussion in 'Graphics for ECS' started by spinaljack, Jan 31, 2023.

  1. spinaljack

    spinaljack

    Joined:
    Mar 18, 2010
    Posts:
    992
    Is anyone having huge performance penalty with mirrors in VR using URP and ECS?

    I have VR mirrors in my previous game with ok performance on quest using 2020
    but with unity 2022 URP and ECS I'm getting single digit frame rates on PC.

    Even a single camera and render texture is super slow.
     
    Last edited: Jan 31, 2023
  2. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,063
    Check the profiler and see the difference.
    And make sure they both use render textures, there are many ways to get mirrors working
     
  3. spinaljack

    spinaljack

    Joined:
    Mar 18, 2010
    Posts:
    992
    Render texture performance is terrible on 2022
     
  4. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,063
    If you have a reproducable project make a bug report so it can be fixed
     
  5. Ward101

    Ward101

    Joined:
    Mar 22, 2016
    Posts:
    52
    Same issue here. Already reported (waiting for Unity response).

    Using VR (HTC Vive Pro 2, SteamVR), OpenXR (also reproducible on legacy OpenVR)
    Tested on Unity URP Sample scene (no ECS required).
    Whenever the scene contains a VR rig and an additional cameras that renders to Render Textures, the performance drops to one digit FPS, making them unusable. We get very strange spikes on profiler.
    If you disable the additional cameras, perfo returns to high numbers.
    We use regularly VR and Render Textures for different purposes, and have been using for years.
    Tested on RTX 3080 and 3090.

    The issue do not occur if you disable VR from Project Settings
    The issue do not occur on Unity 2020.3.38 and .45
    The issue do not occur if the second camera renders to an additional display instead of a render texture.

    Wrong community for this issue, as I do not use ECS here. But wanted to reply on this thread
     
    alexkarantza and DevDunk like this.
  6. YVR_WXJ

    YVR_WXJ

    Joined:
    Aug 12, 2022
    Posts:
    3
    Same Issue here.

    In the frame debugger, it seems that UI has been drawn twice.

    There are only two uis that can be rendered by the camera, but 4 draw call be called. The first dc is the same with third dc, while the second dc is the same with 4th dc.
    upload_2023-3-14_7-51-57.png
     
  7. alexkarantza

    alexkarantza

    Joined:
    Dec 28, 2020
    Posts:
    1
    I was also experiencing this (not using ECS).

    Out of curiosity I upgraded to the beta of 2023.1.0, without changing anything else, and that resolved the issue. So clearly whatever bug was causing this was fixed, but not backported.
     
    DevDunk likes this.
  8. Tuncle

    Tuncle

    Joined:
    Oct 1, 2018
    Posts:
    23