Home | History | Annotate | Download | only in raw
      1 varying lowp vec4 color;
      2 varying lowp float factor1;
      3 varying lowp float factor2;
      4 
      5 void 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