uniform mat4 matrix; attribute vec4 vertex; attribute vec4 color; attribute float pointSize; varying vec4 _color; void main() { //set the size of the point gl_PointSize = pointSize; //multiply each vertex by a matrix. gl_Position = matrix * vertex; //pass the color to the fragment shader _color = color; }