Sign in to follow this  
slingchilders

WebGl performance on mobile

Recommended Posts

I've looked at all the topics here on this forum, and they all seem to be suggesting that debug.text is to blame for this.

I have a rather large scene, no debug whatsoever, and on desktop it works fine.

However on mobile, iphone SE, with canvas it's 60FPS, with WebGl, it's 10-20 :/

I don't use anything other than sprites, a few masks and tweens.

What gives? I need to use WebGl, because I would like to use filters in the future.

Share this post


Link to post
Share on other sites

Hey. Poor webGL performance could be due to a few things aside from phaser.debug.

Because your scene is large, it might be due to Phaser(pixi) uploading entire buffers on the GPU every render frame.  Perhaps, some profiling could help you? :(

Check out  #356

Share this post


Link to post
Share on other sites

Why would PIXI do that, and not just render quads via webgl?

Seems like the way it is set up is simply not meant for mobile devices, am I right?

Even a simple demo in pure webgl renders literally thousands of sprites on iPhone SE with 60 fps. Phaser is struggling with a few :/

Share this post


Link to post
Share on other sites

It does render quads. But it uploads the entire buffer every frame - come to think of it, this will usually be necessary if all/most objects in the scene move. I was working on a game where a few hundred quads would remain static throughout and other objects (quads) moved. Uploading just the bufferSubData() helped me with performance significantly!

Also, are you using multi texture batching

You might also want to try Phaser 2.6.2; Apparently, it performs much better than the current ce version.

PS Could you please check the number of draw calls you get with webGL?

Share this post


Link to post
Share on other sites

I wanted to confirm that the problem was only on CE version. Haven't changed anything in the code, just switched to 2.6.2 and the performance is through the roof! Almost double.

Is it really impossible to use CE version of phaser for mobile webgl? Why is it soooooooooooo slow.

Share this post


Link to post
Share on other sites
On 1/23/2018 at 1:13 PM, slingchilders said:

I wanted to confirm that the problem was only on CE version. Haven't changed anything in the code, just switched to 2.6.2 and the performance is through the roof! Almost double.

Is it really impossible to use CE version of phaser for mobile webgl? Why is it soooooooooooo slow.

i did the same, move from 2.7.8 to 2.6.2 and the performance is much much better. I hit 60 fps with Webgl on Android phones :)

Share this post


Link to post
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...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.