Oh, yes, it may be a regional problem. I can’t access it.
When using ShaderBuffer.update, it will consume a lot of performance. Is there a better way to update the Buffer?
The value of paramDataLength is extremely large. If there are 1000 particles, there will be a length of 190000+.
If I just update the time, can I avoid updating it frequently?
I implemented a ShaderBuffer update method and optimized performance. Now 10000 particles can be maintained at about 20 - 30FPS.
1W? Do you mean 1M, 1 million?
Sorry, it is 10000
Good result indeed! What did you do to optimize the update?
The main optimization here is that particles that do not need to be updated do not update their data. If only the life time is updated, the performance of the particle will be better, and a parameter may be needed to control it. If only the life time is updated, a certain amount of randomness will be lost.
Release openfl-gpu-particles v0.0.4:
- New: Added copy support, copy attributes.
- Improvement: The improvement will synchronize the effect according to the zoom ratio of the Sprite.
- Added: Added
randomLiferandom life parameter, if you don’t want random parameters, please set it to 0.
- New: Added
GPUArrayAttributearray parameter, which can fix the queue parameter value.
- Fix: Fix the problem that random values would disrupt the survival status.
- Optimization: Optimize the data update performance of ShaderBuffer.
Discussion: is it better to use ‘OpenglRenderer’ to implement GPU particles?