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

Slow rendering on : webgpu_compute_particles #30344

Open
Makio64 opened this issue Jan 17, 2025 · 3 comments
Open

Slow rendering on : webgpu_compute_particles #30344

Makio64 opened this issue Jan 17, 2025 · 3 comments

Comments

@Makio64
Copy link
Contributor

Makio64 commented Jan 17, 2025

Description

On iphone12 pro max it seems the "webgpu_compute_particles" is very slow, I originally though its the computation, but it's actually the particule rendering:

  • Webgpu safari, top angle : 60fps
  • Webgpu safari, bottom angle : 20fps

I'm a bit surprised cause I though render 1M particles would have been a piece of cake in webgpu.

For the moment I can do a PR :

  • to setup 256k particles on mobiles by default
  • add a gui to select the number and regenerate the particles system.
  • pause/play the physics

So it might help to monitoring the performance on various mobile

Reproduction steps

  1. open the example on mobile
  2. play with the camera angle

Code

X

Live example

X

Screenshots

X

Version

r172

Device

Mobile

Browser

Safari

OS

iOS

@Mugen87
Copy link
Collaborator

Mugen87 commented Jan 22, 2025

I'm a bit surprised cause I though render 1M particles would have been a piece of cake in webgpu.

When an application is fragment shader bound, using WebGPU won't help.

I do not vote to introduce mobile specific presets in the examples since that will only complicate things. As a quick fix, we could lowering the particle count to 500000 which should noticeably improve the performance and the example will still look good.

@Makio64
Copy link
Contributor Author

Makio64 commented Jan 26, 2025

I think it add just a fews lines to dispose and recreate the buffer ( or reallocate ) and call the computeInit again once the user select the number desired ?

@Mugen87
Copy link
Collaborator

Mugen87 commented Jan 26, 2025

If we start doing this in webgpu_compute_particles, it's fair to ask doing it in all other compute examples which I'd like to avoid. Let's try to keep things as simple as possible.

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