Search Unity

GFX.ReadbackImage spike (110ms!) when additively loading a scene

Discussion in 'General Graphics' started by allornothingJM, May 6, 2018.

  1. allornothingJM

    allornothingJM

    Joined:
    Feb 3, 2015
    Posts:
    20
    We additively load scenes for areas of the game, and been on a long journey of trying to iron out the hitches that occur when doing so. We've tracked down a few culprits, but this one has stumped me and I can't find any info online about it.

    When we stream in a scene, I get a massive spike of 110ms on Gfx.ReadbackImage, and also a massive spike in the renderer. There are no realtime probes active.

    upload_2018-5-6_13-9-12.png

    What does the ReadbackImage do?

    Why does the renderer spike so much - is it rendering all geometry for a few frames before occlusion culling kicks in on those objects (hence it dipping back down again afterwards)?

    Any help on these topics would be much appreciated. I'm assuming there is a connection somehow but if it's two separate issues causing it then I'm happy to split threads.
     
  2. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    3,014
    ReadbackImage reads the pixels from the current framebuffer. In order to read it, it has to complete all the rendering, and the read back itself is usually slow.
    Given that it comes from Enlighten, I'd suggest asking in the Global Illumination forum.
     
  3. allornothingJM

    allornothingJM

    Joined:
    Feb 3, 2015
    Posts:
    20
    Thank you, will post there :)