cur.frag 257 B

123456789101112131415161718
  1. #version 330 core
  2. uniform float time;
  3. uniform float last_press;
  4. in vec2 uv;
  5. float map01(float x)
  6. {
  7. return (x + 1) / 2;
  8. }
  9. void main()
  10. {
  11. int c1 = int(time - last_press < 0.8);
  12. int c2 = int(floor(time / 0.4)) % 2;
  13. gl_FragColor = vec4(1) * (c1 + c2);
  14. }