Jump to content

WebGL flickering on Samsung s21 Android 12


julien-moreau
 Share

Recommended Posts

Hi all! I hope you are fine! :)

We are experiencing a strange graphics issue using the Samsung s21 with Android 12 (even chrome, firefox, etc.). We have several games developed using the awesome Pixi.JS v4.8.8 and, at some particular state of the renderer, the screen displays some gliches/flickers each frame.

I'm part of the Babylon.JS core team so, for sure, I have firstly tried to reproduce using Babylon.JS :)
Unfortunately I failed to reproduce so I decided to dig into the Pixi.JS source code.

After some intuition and tries, I found that the problem is solved when all vertex buffers stored using the "STREAM_DRAW" hint become stored using the "STATIC_DRAW" hint. Both "STREAM_DRAW" and "DYNAMIC_DRAW" generate the problem, only "STATIC_DRAW" fixes the problem. Of course, I don't think the problem comes from Pixi.JS but more from the driver or the browser itself. It would be awesome if we can be sure of that together. As I'm not a Pixi.JS source code professional, I would really appreciate if you can confirm it can't come from the Pixi.JS WebGL renderer ❤️

I have shared 2 videos where you can see the flickering effect. You can also see that according to what is rendered, the problem looks different.
In the stage there are only sprites and only 1 mesh (NineSlicePlane), no filter and not render target. WebGL context is created using default values (stencil: true, alpha: false, etc.).

Also, I failed to reproduce in the Pixi.JS playground because I think the problem appears only in specific states, specific buffer sizes etc. Maybe that's why I failed to reproduce with Babylon.JS as well :(
When I say "specific", I mean that we have a lot of other games using Pixi.JS 4.8.8 and they are working perfectly with Samsung S21 & Android 12. Only few have this problem I mentioned above.

If needed, I can share some Spector.JS records so you can see the delta in WebGL commands between 2 frames (one that works and one that fails)

Here all the informations I have:

- the problem does not appear in Samsung S21 with Android 11
- the problem appears with Samsung S21 with Android 12
- the problem does not appear in Google Pixel 5 with Android 12

Cheers and thanks again for your awesome work!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...