Search Unity

Question Graphical glitches on M1/M2 macbook

Discussion in 'Web' started by andyz, Feb 29, 2024.

  1. andyz

    andyz

    Joined:
    Jan 5, 2010
    Posts:
    2,267
    I am seeing problems on the newer macbooks with webgl reflections (custom builtin fyi).
    It is a bit like z fighting (but it is not as 1 surface) but also very checkboard like, see below.

    This does not happen on pre-M1/M2 macbooks or indeed any windows devices tested.
    Anyone see such issues and found a cause?

    macGlitch.png

    (NB I previously found out these laptops have problems with higher than 4x AA so it seems they have odd limits on what can be done)
     
  2. brendanduncan_u3d

    brendanduncan_u3d

    Unity Technologies

    Joined:
    Jul 30, 2019
    Posts:
    434
    Can you provide more information, like what version of Unity. And can you file a bug with a small repo?
     
  3. andyz

    andyz

    Joined:
    Jan 5, 2010
    Posts:
    2,267
    This was reported recently but older content built in Unity 2019 so I would have to find time to try and repo in 2022, but time is short currently.
    So I was wondering if anyone had found unsupported things on Mac silicon webgl (only webgl) that created issues

    Edit: unless this is caused by nan in custom shaders which are somehow less handled in this rare case?! Only happens with point lights in the scene
     
    Last edited: Mar 1, 2024
  4. brendanduncan_u3d

    brendanduncan_u3d

    Unity Technologies

    Joined:
    Jul 30, 2019
    Posts:
    434
    It looks like a M1/2 driver issue, those look like tiling artifacts. There are a bunch of other factors. Is it on Safari? Chrome? Both? What versions? WebGL1 or 2? Safari used to have their own WebGL implementation, which was limited to WebGL1. A couple years ago they dropped their own WebGL implementation and started using ANGLE, the WebGL implementation that Chrome uses, and that gave them WebGL2 support. ANGLE (Chrome and now Safari) has different back-ends. It used to be OpenGL back-end, but recently they switched to a Metal backend.

    So depending on the browser, and version, changes how WebGL is implemented on MacOS fairly drastically. If it's artifacts like this, it seems to be coming from the back-end of WebGL (where WebGL gets translated to native gpu calls), so I'd need to know that info to dig into it more. I haven't seen this artifact myself.
     
    andyz and De-Panther like this.
  5. andyz

    andyz

    Joined:
    Jan 5, 2010
    Posts:
    2,267
    Seems to be to do with the old surface shaders in built in and a point light in webGL.
    bug IN-70137
     
    De-Panther and brendanduncan_u3d like this.