how to increase thickness of points?

Hello, i am trying to render a lot of points using a mesh, but they only take up 1 pixel. is there a way to make the points thicker, so they take up multiple pixels on the device? thanks

Unfortunately you can’t change the pointsize in Unity. Though even if you could a point would be rendered as a quad. You essentially have two options:

  • If you aim for newer devices only, you could use a geometry shader which replaces each point with a screenspace aligned quad. That way you can still use a Mesh with Point topology. Though not every hardware supports geometry shaders
  • To be more backward compatible you have to create a quad mesh yourself and update the alignment if the camera changes (billboard sprites essentially).

Though terms like “a lot” is open for interpretation. Some consider 100 a lot, other 10k other 1M. When building a quad mesh manually keep in mind that the vertex count is quadrupled. The same is true for geometry shaders, though this all happens on the GPU during rendering.

If the points should look “round” there are a couple of solutions but none is that trivial. You could still use quads but generate UV coordinates for them. Now you can simply map a texture (quite expensive) or if you want a solid color a fragment shader that does a radial cutoff from the center. Another way would be to generate a more circle like mesh (instead of a quad, generate a regular octagon for example). Though each “point” would require a lot more vertices that way.