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.
  2. Dismiss Notice

Can Unity's Scriptable Render Pipeline leverage Vulkan subpasses?

Discussion in 'General Graphics' started by mabulous, Jan 26, 2021.

  1. mabulous

    mabulous

    Joined:
    Jan 4, 2013
    Posts:
    198
    The problem when rendering multiple renderpasses on a mobile architecture is that mobiles usually use tiled renderers, where the framebuffer gets rendered in tiles one after another. tile memory is super fast, but loading data in and out from it is usually a bottleneck.
    Rendering multiple passes (with unextended OpenGL ES at least) on mobile thus comes with a big performance impact, since first all tiles of the first pass get rendered (each time storing the result out from tile memory to main memory) and then all the tiles of the next pass get rendered, loading that data back in from main-memory to tile memory for each pass.

    Vulkan offers a solution to this problem using sub-passes (https://www.khronos.org/assets/uplo.../2016-vulkan-devday-uk/6-Vulkan-subpasses.pdf) (and similarily extended OpenGL ES can do something like that with the GL_PIXEL_LOCAL_STORAGE extension if the shaders are written specifically to make use of it).

    Can Unity leverage this feature and if so, how?

    When writing a scritable render pipeline, what needs to be observed so that Vulkan subpasses will be used to render multiple passes?
     
  2. colin299

    colin299

    Joined:
    Sep 2, 2013
    Posts:
    176