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 #10

Open
khudiiash opened this issue Oct 30, 2024 · 2 comments
Open

Performance #10

khudiiash opened this issue Oct 30, 2024 · 2 comments

Comments

@khudiiash
Copy link

Performance is quite horrible
I did a lot of tests
even one simple effect eats around 25%-40% of frame time, mostly because of constant gl queries
I am not sure whether this can be better optimized or not, but for now, it cannot be used on most mobile devices due to heavy cpu-gpu queries.
Screenshot 2024-10-30 at 12 56 44

@durswd
Copy link
Contributor

durswd commented Oct 31, 2024

Please refer

https://github.com/effekseer/EffekseerForWebGL

  // fast rendering by skipping state fetching.
  // If there is a problem with the drawing, please set this flag to false.
  var fastRenderMode = true;

  if (fastRenderMode) {
    context.setRestorationOfStatesFlag(false);
  }

It need to restore gl states from PlayCanvas

@khudiiash
Copy link
Author

khudiiash commented Nov 7, 2024

so yes, when I turn off restoration, playcanvas transparent layers don't get rendered. But when it is turned on, effekseer performs gl states saving/restring that takes a lot of resources, a lot more than just drawing the effects. Is there any way out to save performance?
My primary concern is that gl states saving and restoring takes a lot more resources than just rendering the effect, which does not look like a right thing.

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

2 participants