Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Feature Request Public API's for ScriptableRendererFeature implementations

Discussion in 'Graphics Dev Blitz Day 2023 - Q&A' started by Peter77, May 24, 2023.

  1. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,572
    Most ScriptableRendererFeatures don't have a public API.

    For instance, there's no way to control the parameters of the ScreenSpaceAmbientOcclusion SRF through a public API. In one project, I needed to tweak SSAO with different parameters across the level, but the only workaround was to use reflection code that caused per-frame memory allocations.

    Another example? It'd be great to control the maximum draw distance of the Decal SRF. Typically, PC games let users modify their settings to suit their hardware.

    When implementing a ScriptableRendererFeature, it would be awesome if its parameters were exposed through a public API.
     
  2. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    499
    I still don't understand what the scriptable render feature is for.
    There should be a common API for URP and HDRP, like a "volume custom pass" or something like old and simple command buffers.
     
  3. mandisaw

    mandisaw

    Joined:
    Jan 4, 2018
    Posts:
    78
    Formerly-Unity-Matt actually had a pretty good dive into this on his GameDevGuide channel a couple wks back -


    In addition to more extensive public APIs, my vote is for better SRP scripting & shader/PP documentation overall. Even if it's not 100% coverage, or beta-level up-to-date. There's clearly a robust system there under-the-hood, but just from my POV, I can't commit to URP / RP-customization for production until I feel confident in the ins-and-outs.
     
  4. ManueleB

    ManueleB

    Unity Technologies

    Joined:
    Jul 6, 2020
    Posts:
    110
    We are working on a big overhaul of our custom pass API (ScriptableRenderPass and ScriptableRenderFeature). The work should be available in 23LTS and will improve greatly the extensibility of URP, and give more powerful tools and APIs to users to be able to achieve much more than it's possible with the current API

    As part of the work I mentioned above, the data used by all the internal passes will be easier to access, together with all the frame resources (textures, buffers) used internally by URP. The API will also allow users and asset store developers to easily add their own custom data, used in a specific pass/feature, to be available in other passes and later in the frame.

    Together with the new API work, we are making a big push to make sure that all the new workflows will be documented extensively, with tutorials/code samples and upgrade guides as complementary material.

    A scriptable render feature is one of the intended way for users to inject their custom rendering at a specific frame event.
    As a longer term goal, not happening yet in 23LTS, we are also working on unifying the URP and HDRP APIs to make it easier having the pipelines coexist in the same project, and making asset/project development easier, minimizing the fragmentation

    stay tuned for more information and material as we get closer to the release date