Jump to content

WebGl performance on mobile


slingchilders
 Share

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.

Link to comment
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

Link to comment
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 :/

Link to comment
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?

Link to comment
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.

Link to comment
Share on other sites

  • 1 year later...
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 :)

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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