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

Visual artefacts when building default URP scene on 2020 using WebGL 1.0 / OpenGLES2 graphics API

Discussion in 'WebGL' started by R42_Leon, Oct 31, 2020.

  1. R42_Leon

    R42_Leon

    Joined:
    Feb 24, 2016
    Posts:
    25
    Hi all, I tried building the sample scene which comes with the URP on Unity 2020.11.f1 using WebGL 1.0 as graphics API (to test on Safari mobile, where 2.0 is not supported yet) and I am seeing some visual artefacts:

    upload_2020-10-31_16-46-9.png

    It looks fine when using WebGL 2.0. The artefacts appear both on Chrome desktop and mobile. The only options changed where graphics API to WebGL 1.0, Color Space to Gamma (since linear is not supported on WebGL 1.0) and I disabled post-processing on the camera (for the same reason).

    In comparison, the same scene with the same settings built on 2019.4.12f1 looks fine, both on desktop and mobile - is this a regression?
    upload_2020-10-31_16-48-50.png
     
  2. jukka_j

    jukka_j

    Unity Technologies

    Joined:
    May 4, 2018
    Posts:
    944
    This certainly is a regression. Can you report it as a bug, and add the screenshots and the Unity version numbers in the info? Thanks!

    Btw does the issue reproduce on Chrome on desktop if you disable Auto Graphics API in build settings, and only enable WebGL 1? That would allow diagnosing whether it is something specifically in Safari, or something in WebGL 1.
     
  3. R42_Leon

    R42_Leon

    Joined:
    Feb 24, 2016
    Posts:
    25
    Thanks, submitted as case 1289332.

    And yes, my player settings are targeting WebGL1.0 specifically as Graphic API (auto is unchecked), the issue is present on desktop as well.
     
  4. eppegamestudio

    eppegamestudio

    Joined:
    Nov 7, 2020
    Posts:
    1
    What is the status on this issue? I experience the same when running my scene on Safari (WebGL1.0)
     
  5. jukka_j

    jukka_j

    Unity Technologies

    Joined:
    May 4, 2018
    Posts:
    944
    Thanks for the bug report (and sorry for missing your original reply here @R42_Leon)

    Reading the resolution of bug 1289332, there is a correspondence log

    [...] it seems that this is caused by the Lightmap Encoding being set to "High Quality" in the Player Settings. In previous versions it was set to "Normal Quality" by default, that's why the problem didn't appear. Could you try changing the Lightmap Encoding to the "Normal Quality" option and see if it helps to resolve the visual artifacts? (Edit->Project Settings->Player->Other Settings->Rendering->Lightmap Encoding)

    I can confirm that the issue does not appear when the encoding is set to
    "Normal Quality".

    and the issue was closed as rejected, since it is occurring only on WebGL 1.0, and there was a clean workaround available. We are in the process of minimizing any work necessary for WebGL 1.0, and hoping that Apple would finally ship WebGL 2.0.. it has been 4.5 years now.

    Hopefully that workaround resolves the issue for you as well!
     
    OceanX000 likes this.