Search Unity

Question What is the issue with native renderpass and XR ?

Discussion in 'Universal Render Pipeline' started by XRA, Jul 14, 2021.

  1. XRA

    XRA

    Joined:
    Aug 26, 2010
    Posts:
    265
    Noticed that RenderPass gets disabled if using XR in URP 12, would like some insight as to why, and will it be supported in the future?
     
  2. Immersive-Matthew

    Immersive-Matthew

    Joined:
    Mar 24, 2020
    Posts:
    137
    How did you determine it was disabled?
     
  3. ManueleB

    ManueleB

    Unity Technologies

    Joined:
    Jul 6, 2020
    Posts:
    110
    Hey,
    Native Render Pass support is still work in progress and experimental so it only supports Metal and Vulkan mobile platforms at the moment. Work on adding XR support has started and is in progress, should be available in one of the next releases.
     
    DevDunk likes this.
  4. Immersive-Matthew

    Immersive-Matthew

    Joined:
    Mar 24, 2020
    Posts:
    137
    Thanks Manuele. What will be the benefits of Render Pass?
     
    MagiJedi likes this.
  5. ManueleB

    ManueleB

    Unity Technologies

    Joined:
    Jul 6, 2020
    Posts:
    110
    in short, mobile performance optimizations

    It allows URP to take full advantage of TBDR GPUs (mobile) by using the Unity RenderPass API under the hood. If you are familiar with APIs like Vulkan or Metal, it does this by explicitly giving control of the render pass/subpasses setup done in the underlying graphics API.
    This also enables optimizations like framebuffer fetch/programmable blending to minimize bandwidth and battery usage on those devices.

    You can find more info and usage examples on the RenderPass API here:
    https://docs.unity3d.com/2021.2/Doc....ScriptableRenderContext.BeginRenderPass.html
     
  6. Immersive-Matthew

    Immersive-Matthew

    Joined:
    Mar 24, 2020
    Posts:
    137
    Sounds like I need to give this a try once 2021.2.x has the various bugs addressed. Thank you!
     
    ManueleB likes this.
  7. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    This sounds essential for Quest 2 and beyond really. Being able to reduce post or even HDR cost on that platform would be amazing!
     
  8. nosv

    nosv

    Joined:
    Aug 27, 2013
    Posts:
    2
    Are there any updates on this? I've noticed that Render Passes are still disabled for XR in the latest version of URP.
     
  9. ManueleB

    ManueleB

    Unity Technologies

    Joined:
    Jul 6, 2020
    Posts:
    110
    it should be available in 23.2, the work is currently close to land. Due to the size of the changes it won't be possible to backport it to previous versions
     
    nosv likes this.