ComputeShader in Processing

ComputeShader in Processing

三月 20, 2019

Processing is usually a target for blame with its poor performance due to the redundancy of its source code and the relatively low efficiency of Java itself.
But there are many ways to fill that gap, such as CPU multi-thread computing and GPGPU computing.
For simple graphics computing tasks, it is not necessary to write complicate multi-thread code or using complex OpenCL APIs. Doing that will only make things more complicated and low efficient. So, the best option is using Compute Shader.

By default, Processing does not support Compute Shader, so I implemented Compute Shader of OpenGL 4.x into native Processing 3.
This example renders 1 million particles on a GTX650 Ti graphics card in real-time.

Github Repo...