Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Question VR Refraction without Opaque Texture

Discussion in 'Universal Render Pipeline' started by Incode, Dec 7, 2022.

  1. Incode

    Incode

    Joined:
    Apr 5, 2015
    Posts:
    76
    Is it possible to get URP VR refraction working without using the opaque texture? Seems like trying to use opaque texture on Quest and URP 10.0.6 still has issues when using MSAA.
     
  2. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    2,446
    I don't think URP has a proper way of doing this. There is a grab pass URP extension on git, but I think performance of that will be really bad (not tested tho).
    What is the issue you are having? You could make a bug report for it so it can be fixed instead of finding another workaround.

    I have used opaque textures quite a bit for VR as well
     
  3. Incode

    Incode

    Joined:
    Apr 5, 2015
    Posts:
    76
    As far as I can tell, attempting to use the URP opaque texture path with MSAA doesn't work in 10.x versions of URP, and later versions aren't available to us, since we're still using 2020 LTS. Have you used Opaque on Quest in later versions? I believe this is a Quest specific bug from what I've read.
     
  4. funkyCoty

    funkyCoty

    Joined:
    May 22, 2018
    Posts:
    613
    The "opaque" texture requires doing a blit internally, which has huge performance implications on quest 1/2 hardware. I really recommend that you do NOT even attempt this on quest, as youre going to massively reduce performance.

    The reason has to do with quest's tiled architecture. When you do a blit, the gpu has to resolve the texture from fast memory into slow memory, make a copy of it, and then get back to tiled rendering again afterwards. You will easily eat up 1ms or more (depending on resolution and msaa quality settings) just to bring OpaqueTexture into existence!
     
  5. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    2,446
    Can confirm. Just having it enabled without using it was a major performance hit