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. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

WebGL Problem: Performance Warning: Recreating Offscreen FBO (1920x1200 => 300x150)

Discussion in 'WebGL' started by Ethan, May 15, 2020.

  1. Ethan

    Ethan

    Joined:
    Jan 2, 2008
    Posts:
    501
    Hey guys,

    Didn't write in a while I guess. ;)

    Anyway I have a problem with Unity 2019.3.11f1 creating a WebGL binary.
    When the I open the WebGL game in the browser, the game looks like its resolution is "300x150" but stretched to the intended 1280x800 res ... so very very ugly/pixely!
    If I press the fullscreen button the game goes fullscreen and looks good, with the right resolution. When I go back with "Escape" the game also looks good in the intended 1280x800 resolution.

    There's a console entry that caught my attention:
    "Performance Warning: Recreating Offscreen FBO (1920x1200 => 300x150)"
    Maybe that's what's going wrong?

    Further info: game was created in Unity 2019.1 or 2 with LWRP and then updated to 2019.3. With the old Unity versions the WebGL builds were fine.
    Any help would be appreciated! Thanks.

    Here is the complete browser console output:
    Successfully compiled asm.js code (total compilation time 0ms) 3 UnityLoader.js
    [UnityCache] 'https://lalasupersecretURL.com/WebGL_200c.wasm.code.unityweb' successfully revalidated and served from the indexedDB cache UnityLoader.js:4:13404
    You can reduce your startup time if you configure your web server to host .unityweb files using gzip compression. UnityLoader.js:3:8488
    [UnityCache] 'https://lalasupersecretURL.com/WebGL_200c.wasm.framework.unityweb' successfully revalidated and served from the indexedDB cache UnityLoader.js:4:13404
    [UnityCache] 'https://lalasupersecretURL.com/WebGL_200c.data.unityweb' successfully revalidated and served from the indexedDB cache UnityLoader.js:4:13404
    Der Bewegungssensor sollte nicht mehr verwendet werden. 7bcbc10b-ba4e-46de-8207-3a67534a6651:8:199956
    Der Orientierungssensor sollte nicht mehr verwendet werden. 7bcbc10b-ba4e-46de-8207-3a67534a6651:8:199956
    Loading player data from data.unity3d
    7bcbc10b-ba4e-46de-8207-3a67534a6651:8:49137
    Initialize engine version: 2019.3.11f1 (ceef2d848e70)
    7bcbc10b-ba4e-46de-8207-3a67534a6651:8:49137
    [Subsystems] Discovering subsystems at path UnitySubsystems
    7bcbc10b-ba4e-46de-8207-3a67534a6651:8:49137
    Creating WebGL 2.0 context. UnityLoader.js:4:11179
    Renderer: Mozilla
    7bcbc10b-ba4e-46de-8207-3a67534a6651:8:49137
    Vendor: Mozilla
    7bcbc10b-ba4e-46de-8207-3a67534a6651:8:49137
    Version: OpenGL ES 3.0 (WebGL 2.0)
    7bcbc10b-ba4e-46de-8207-3a67534a6651:8:49137
    GLES: 3
    7bcbc10b-ba4e-46de-8207-3a67534a6651:8:49137
    EXT_color_buffer_float GL_EXT_color_buffer_float EXT_float_blend GL_EXT_float_blend EXT_texture_compression_bptc GL_EXT_texture_compression_bptc EXT_texture_filter_anisotropic GL_EXT_texture_filter_anisotropic OES_texture_float_linear GL_OES_texture_float_linear OVR_multiview2 GL_OVR_multiview2 WEBGL_compressed_texture_s3tc GL_WEBGL_compressed_texture_s3tc WEBGL_compressed_texture_s3tc_srgb GL_WEBGL_compressed_texture_s3tc_srgb WEBGL_debug_renderer_info GL_WEBGL_debug_renderer_info WEBGL_debug_shaders GL_WEBGL_debug_shaders WEBGL_lose_context GL_WEBGL_lose_context
    7bcbc10b-ba4e-46de-8207-3a67534a6651:8:49137
    OPENGL LOG: Creating OpenGL ES 3.0 graphics device ; Context level <OpenGL ES 3.0> ; Context handle 22320296
    7bcbc10b-ba4e-46de-8207-3a67534a6651:8:49137
    WARNING: Shader 7bcbc10b-ba4e-46de-8207-3a67534a6651:8:49137
    Unsupported: 'Hidden/Universal Render Pipeline/ScreenSpaceShadows' - All passes removed
    7bcbc10b-ba4e-46de-8207-3a67534a6651:8:49137
    WARNING: Shader 7bcbc10b-ba4e-46de-8207-3a67534a6651:8:49137
    Did you use #pragma only_renderers and omit this platform?
    7bcbc10b-ba4e-46de-8207-3a67534a6651:8:49137
    ERROR: Shader 7bcbc10b-ba4e-46de-8207-3a67534a6651:8:49137
    Hidden/Universal Render Pipeline/ScreenSpaceShadows shader is not supported on this GPU (none of subshaders/fallbacks are suitable)
    7bcbc10b-ba4e-46de-8207-3a67534a6651:8:49137
    UnloadTime: 1.000000 ms
    7bcbc10b-ba4e-46de-8207-3a67534a6651:8:49137
    warning: 2 FS.syncfs operations in flight at once, probably just doing extra work 7bcbc10b-ba4e-46de-8207-3a67534a6651:8:101066
    Input Manager initialize...
    7bcbc10b-ba4e-46de-8207-3a67534a6651:8:49137
    Performance Warning: Recreating Offscreen FBO (1920x1200 => 300x150)
    7bcbc10b-ba4e-46de-8207-3a67534a6651:8:49137
    Performance warning: deleting framebuffer on context thread release!!!! UnityLoader.js:4:11179
    WebGL warning: drawBuffers: For the default framebuffer, `buffers[0]` must be BACK or NONE. 2 7bcbc10b-ba4e-46de-8207-3a67534a6651:8:265066
    WebGL warning: drawElementsInstanced: Drawing to a destination rect smaller than the viewport rect. (This warning will only be given once) 7bcbc10b-ba4e-46de-8207-3a67534a6651:8:265147
    WebGL warning: drawBuffers: For the default framebuffer, `buffers[0]` must be BACK or NONE. 7bcbc10b-ba4e-46de-8207-3a67534a6651:8:265066
    Performance warning: deleting framebuffer on context thread release!!!! UnityLoader.js:4:11179
    WebGL warning: drawBuffers: For the default framebuffer, `buffers[0]` must be BACK or NONE. 3 7bcbc10b-ba4e-46de-8207-3a67534a6651:8:265066
     
    Last edited: May 15, 2020
  2. Ethan

    Ethan

    Joined:
    Jan 2, 2008
    Posts:
    501
    Problem persists.
    No one has encountered behaviour like this?
     
    Guillaume-atVolumiq likes this.
  3. friuns3

    friuns3

    Joined:
    Oct 30, 2009
    Posts:
    304
    same here, for me happens only at first launch, to reproduce i need clear cache
     
    Last edited: Jun 3, 2020
    Guillaume-atVolumiq likes this.
  4. Guillaume-atVolumiq

    Guillaume-atVolumiq

    Joined:
    Sep 14, 2018
    Posts:
    27
    Same bug happening to us, though, very random on a one-time PHP page context but happen nearly every time on a Angular context when loading our Web Component (which restart the UnityInstance) after a third time.

    No error or warning on the console (did you guy used a debug build ?), internal resolution is 300x150 stretched to the size of the web canvas and our UI is all collapsed on itself.


    It can be fixed/refreshed by resizing the browser window or the level of zoom on the web page but this is not a viable workaround for our clients.

    I tried many ways to trigger these resize/zoom events through JS scripts to simulate these behavior for the user but none of them worked.

    This has been built with 2019.3.0f6, we're looking to upgrade to 3.15f1 to see if it is fixed.
     
  5. Ethan

    Ethan

    Joined:
    Jan 2, 2008
    Posts:
    501
    Ah, I am not alone. ;)

    Please let us know if 2019.3.15f1 fixed it for you. Thanks.
     
  6. Guillaume-atVolumiq

    Guillaume-atVolumiq

    Joined:
    Sep 14, 2018
    Posts:
    27
    Unfortunately it doesn't seem to work any better, if worst, it can now happen on the first load of our WebComponent where it used to show up only after a third time
     
  7. NoPressureStudios

    NoPressureStudios

    Joined:
    Jan 27, 2017
    Posts:
    1
    We encountered a very similar issue in one of our games (runs on Unity 2019.4.0f1) and found it was caused by our v-sync settings. During the game's start-up we would disable v-sync to achieve a desired framerate, but doing so would force the game into 300x150. Leaving v-sync to its default setting ("Every V Blank" in the project's quality settings) and not adjusting it during runtime via QualitySettings.vSyncCount solved the issue for us.

    Hope this helps!
     
  8. Ethan

    Ethan

    Joined:
    Jan 2, 2008
    Posts:
    501
    Thanks NoPressureStudios. You are the man!
    That solved it for me. Cheers to you.
     
  9. nandinitrip

    nandinitrip

    Joined:
    Sep 5, 2019
    Posts:
    2
    Did this work for everyone? I am facing a similar issue, but Vsync setting is what NoPressureStudios described.