I want to know is it possible to decrease the number of vertices when I want to build the 1.8M blocks?
because the vertices fully loaded my RAM, and I want to know how can I solve this problem
Now that i can see your code,
i realised M stands for million…
your PG consumes 2.5 GB memory on CPU side,
4.45 GB on GPU side.
SPS is super cool and efficient piece of coding, but it has a downside, particles (or meshes added) has their geometry duplicated for every particle you add. Adding SO many will eat a big chunk of memory!
Some devices will 100% still hit a limit of some kind, like array/buffer sizes, etc
Splitting it into chunks of 200 000 instances as you did originally, and reducing buffer sizes at cost of drawcalls, i’m even able to load it on my phone, (2-3 fps however, it actually loads) https://playground.babylonjs.com/#V1JE4Z#28