extension-boilerplate
extension-boilerplate copied to clipboard
performance problems persist
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
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?
It seems that PictureRenderer._renderNormal where most of the JS calls are.
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.
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 ?
no, the multitexturing in v4 broke it. I'll make batching for your example a bit later and lets see how it goes
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);
@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.
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.
I'll make example for v5 later :)
Thanks for the quick response! I'll have a look at those links and see how far I'll get!