extension-boilerplate icon indicating copy to clipboard operation
extension-boilerplate copied to clipboard

performance problems persist

Open weepy opened this issue 8 years ago • 10 comments

Hi I'm having trouble getting any decent performance with my gradient plugin (on mobile device). It doesn't seem any faster than just using a normal filter.

E.g.

http://codepen.io/alexfoxy/pen/QdqEPO

Am I doing anything majorly wrong or is it just not really possible ?

J

weepy avatar Feb 01 '17 12:02 weepy

it must be faster becausee its using less copy operations. But we need to really know why is it slow, may be its JS problem already?

ivanpopelyshev avatar Feb 01 '17 12:02 ivanpopelyshev

It seems that PictureRenderer._renderNormal where most of the JS calls are.

weepy avatar Feb 01 '17 12:02 weepy

Yes, but we need profiling. If JS takes most of the time, then we can make batches for this renderer :) Something like that for custom renderer is in my list of things to do, so I can just do it earlier than i wanted. Btw, give me your email ill send you invitation to pixijs slack.

ivanpopelyshev avatar Feb 01 '17 13:02 ivanpopelyshev

It's a bit difficult to tell - since it's mostly a mobile issue and I'm failing to get anything decent out of using Safari remote profiling. How could I tell if it's a JS problem ?

email is [email protected]

Is it not possible to just replace the default Sprite shader like it used to be ?

weepy avatar Feb 01 '17 18:02 weepy

no, the multitexturing in v4 broke it. I'll make batching for your example a bit later and lets see how it goes

ivanpopelyshev avatar Feb 01 '17 18:02 ivanpopelyshev

OK - literally my shader is very simple and similar to the PictureExample, except I take out the clamping and add the following: vec4 mixCol = mix(tint, tint2, (vTextureCoord.y*2.0+vTextureCoord.x)/2.0);

weepy avatar Feb 01 '17 18:02 weepy

@ivanpopelyshev Got any news on batched rendering? Would be great to have an example on that, I'm currently using this example as a base but noticing performance issues as well as I increase the number of sprites and would love to get it fixed.

oli414 avatar Feb 24 '19 16:02 oli414

batches for v4 exist in https://github.com/gameofbombs/pixi-heaven/ and https://github.com/pixijs/pixi-projection/

MultiTextureRenderer or something like that. Sorry, no docs about it, but overriding that basic class is easy enough, there are several renderers in those repos that use that technique, Try pixi-heaven.

ivanpopelyshev avatar Feb 24 '19 17:02 ivanpopelyshev

I'll make example for v5 later :)

ivanpopelyshev avatar Feb 24 '19 17:02 ivanpopelyshev

Thanks for the quick response! I'll have a look at those links and see how far I'll get!

oli414 avatar Feb 24 '19 17:02 oli414