Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Performance Warning: Recreating Offscreen FBO on canvas resize

Discussion in 'Web' started by tiggaxxx, Nov 19, 2021.

  1. tiggaxxx

    tiggaxxx

    Joined:
    Jan 13, 2020
    Posts:
    30
    Every time i resize the canvas i get this warning on the console and the canvas flashes black while resizing.

    I have tested it out with different builds, and i found out that if i use a build with the Gamma Color Space this doesn't happen. It only happens with the linear color space.

    Anyone knows why? Or a workarround? That isn't changing the color space to gamma.
     
  2. unityruba

    unityruba

    Unity Technologies

    Joined:
    Nov 6, 2020
    Posts:
    264
    Linear rendering and gamma rendering are different in that in linear rendering, a separate render buffer is created, and then a gamma correction shader is applied to it, then it's copied to the canvas. In gamma rendering, everything's rendered directly to the canvas. That's why there's that warning when you resize the canvas, the render buffer is being recreated.

    Resizing the canvas is an expensive process and interactively doing so is causing it to miss some rendered frames, if you file a bug report, we can look into ways of improving it.

    I hope this helps!