How are PointsMaterial points scaled, and why is it different from everything else?

A point with PointsMaterial size x is not the same size as geometries of size x, e.g. a PlaneGeometry with size (x, x). How does the rendered size relate to the PointsMaterial size property?

Much googling led me to the glPointSize docs, which are incomprehensible, but mention a scaling factor of “distance from the eye to the vertex”. Sure enough, changing the camera fov changes the size of a point relative to other objects in the scene. They match the other objects in the scene when fov is 90 degrees. What is the relationship of fov to rendered size? Are there other parameters that affect the rendered size? Why is it only points that are scaled this way?

Only sprite can be real size.

In case anyone else hits this, the relationship is tan(f/2), where f is the camera fov. So, divide by that when setting PointsMaterial size if you want it to be scaled like the rest of the scene.

This seems like a bug in the PointsMaterial sizeAttenuation code.

3 Likes