Search Unity

What is the purpose of this setting?

Discussion in 'Universal Render Pipeline' started by Ewanuk, Oct 7, 2021.

  1. Ewanuk

    Ewanuk

    Joined:
    Jul 9, 2011
    Posts:
    257
    The documentation here does not cover it:


    upload_2021-10-7_15-55-44.png
     
  2. ManueleB

    ManueleB

    Unity Technologies

    Joined:
    Jul 6, 2020
    Posts:
    110
    Hey!
    This feature was recently added and should be available in the 21.2 release, the documentation has been added in this PR:
    https://github.com/Unity-Technologies/Graphics/pull/5871

    From the PR:

    Indicates whether to use URP's Native RenderPass API. When enabled, URP uses this API to structure render passes. As a result, you can use programmable blending in custom URP shaders. For more information about the RenderPass API, see ScriptableRenderContext.BeginRenderPass.**Note**: Enabling this property has no effect on OpenGL ES.

    What this does is making every ScriptableRenderPass use, under the hood, the Unity RenderPass API, which allows to explicitly declare RenderPasses, SubPasses, Input Attachments for framebuffer fetch etc. (which map 1:1 to Vulkan Render Passes and Metal Encoders). This feature will only affect TBDR GPUs (mobile) when targeting Metal and Vulkan, and is currently experimental. It is already functional but not enabled by default since it is still work in progress

    For more implementation details you can check NativeRenderPass.cs

    Expect more information and documentation to be available in the near future
     
    Last edited: Oct 12, 2021
    Ewanuk likes this.
  3. Nexusmaster

    Nexusmaster

    Joined:
    Jun 13, 2015
    Posts:
    365
    Hi, just had the bug where our Renderer Feature doesn't work in Build (only Editor), if we use Native RenderPass, do you know why this might happen? When I turn it off the RendererFeature also works in Build.
    (Unity 2021.2.16f1 , URP 12.1.6 , Windows11 64bit)
     
  4. eizenhorn

    eizenhorn

    Joined:
    Oct 17, 2016
    Posts:
    2,685
    When you enable that it starts to using framebuffer fetch which you can use in your shaders (which is supported only on gles,gles3,metal)
    https://docs.unity3d.com/Manual/SL-PlatformDifferences.html#using-shader-framebuffer-fetch
    https://docs.unity3d.com/Packages/c...urp-universal-renderer.html#native-renderpass
     
  5. Jonas_Sid

    Jonas_Sid

    Mobile Graphics Developer Unity Technologies

    Joined:
    May 13, 2015
    Posts:
    44
    @Nexusmaster - custom Renderer Features sadly are not supported by Native Render Passes. The way current URP works we have no way of enforcing strict dependencies (inputs/outputs) of the passes without breaking the API so we ultimately decided to disable it automatically on renderer features until we are able to have that.
     
  6. JesOb

    JesOb

    Joined:
    Sep 3, 2012
    Posts:
    1,109
    Do Unity 2023 URP Render Graph will fix this?
     
  7. Nexusmaster

    Nexusmaster

    Joined:
    Jun 13, 2015
    Posts:
    365
    Thanks for the info!
     
  8. Jonas_Sid

    Jonas_Sid

    Mobile Graphics Developer Unity Technologies

    Joined:
    May 13, 2015
    Posts:
    44
    Sorry for the late reply!

    Yes, it should fix this. As RenderGraph will know the dependencies, it will be able to make the decision to merge it into subpass and so on.
     
    JesOb likes this.