1varying lowp vec4 color;
2varying lowp float factor1;
3varying lowp float factor2;
4
5void main()
6{
7    gl_Position = UNI_modelViewProj * vec4(ATTRIB_position.xyz, 1.0);
8    factor2 = (UNI_farPlane - abs(gl_Position.z)) / UNI_farPlane;
9    gl_PointSize = factor2 * UNI_maxPointSize;
10    color = ATTRIB_color;
11    color.a = color.a * factor2;
12    factor2 = abs((factor2 * 2.0) - 1.0);
13    factor1 = (1.0 - factor2) * 0.2;
14}
15