setVerticesData about dynamic vertices data

I created a custom point cloud material and need to update the data at 10hz
The problem now is that the input vertex position length is arbitrary, but setVerticesData will cause a display exception (not all data is displayed)
The following is PG. You can see that except for the first time, 10,000 points are displayed, and then they are limited to 1,000.

I want to know how to solve this problem ?
And further, how to improve efficiency? (I understand that setVerticesData will create the necessary buffers)

I didn’t find out the reason why the number of points is limits, but new vertexData and applyToMesh in the interval work.

This looks great! Does applyToMesh have a significant impact on performance? I need to minimize resource usage as much as possible because I need to process millions of points per second

I’m not really sure but I think setVerticesData and applyToMesh should have basically the same performance.

Yes, applyToMesh is basically calling setVerticesData for the different vertex data you set in the structure.

1 Like

Okay, after testing, the current performance is sufficient.
Thanks