Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

performance problems persist #3

Open
weepy opened this issue Feb 1, 2017 · 10 comments
Open

performance problems persist #3

weepy opened this issue Feb 1, 2017 · 10 comments

Comments

@weepy
Copy link

weepy commented Feb 1, 2017

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

@ivanpopelyshev
Copy link
Contributor

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?

@weepy
Copy link
Author

weepy commented Feb 1, 2017

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

@ivanpopelyshev
Copy link
Contributor

ivanpopelyshev commented Feb 1, 2017

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.

@weepy
Copy link
Author

weepy commented Feb 1, 2017

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 ?

@ivanpopelyshev
Copy link
Contributor

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

@weepy
Copy link
Author

weepy commented Feb 1, 2017

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);

@oli414
Copy link

oli414 commented Feb 24, 2019

@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.

@ivanpopelyshev
Copy link
Contributor

ivanpopelyshev commented Feb 24, 2019

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
Copy link
Contributor

I'll make example for v5 later :)

@oli414
Copy link

oli414 commented Feb 24, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants