How to use a Shader with Point Cloud

You need two things:

  • tell the material that it should be rendered as points: pcs.mesh.material.pointsCloud = true;
  • set the point size in the vertex shader: gl_PointSize = 2.0;

Here’s a PG with those changes:

https://www.babylonjs-playground.com/#U2C1Q6#4

5 Likes