You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
524 B

  1. #version 100
  2. precision mediump float;
  3. // Input uniform values
  4. uniform vec4 color;
  5. // NOTE: Add here your custom variables
  6. void main()
  7. {
  8. // Each point is drawn as a screen space square of gl_PointSize size. gl_PointCoord contains where we are inside of
  9. // it. (0, 0) is the top left, (1, 1) the bottom right corner.
  10. // Draw each point as a colored circle with alpha 1.0 in the center and 0.0 at the outer edges.
  11. gl_FragColor = vec4(color.rgb, color.a * (1.0 - length(gl_PointCoord.xy - vec2(0.5))*2.0));
  12. }