Youtube Google Play Contact Blog

Live demo

It has been reduced to about 100,000 particles, but please note that loading is very slow depending on the device.

About GPU particles

Particles are used to display a large number of objects and create various visual effects. However, displaying a large number of objects one by one is too slow. Therefore, if you use a GPU that can perform a large amount of processing at the same time, you can display hundreds or thousands of times faster.
In this video, we used 10 million particles and what we call Curl noise to show the flames.

Ensure compatibility

Unity has a function called Compute Shader that supports flexible calculations, but in fact, WebGL does not support it. Therefore, I decided to save the position and speed in the render texture and calculate them using the highly compatible ShaderLab.
Various troubles occurred, such as the number of vertices used for calculation exceeded the limit and the highly accurate data type was not supported, but it was solved by dividing the data or initializing it with another type.
* Compatibility is ensured, but please note that the execution speed varies greatly depending on the model.



This project is based on this project.

Leave a comment

Your email address will not be published.