attribute vec2 position;
varying vec2 vPosition;
void main(void) {
vPosition = position;
gl_Position = vec4(position, 0.0, 1.0);
}
precision lowp float;
varying vec2 vPosition;
uniform float time;
uniform float width;
uniform float height;
uniform float slider_a;
uniform float slider_b;
uniform float slider_c;
void main() {
float pi = 3.14159;
float x = (vPosition.x / height) * 36.2;
float y = (vPosition.y / width) * 36.2;
float n = 762.5 * slider_b * sin(time*0.0075);
float m = 420.7 * slider_c * cos(time*0.07);
float a = cos(n * pi * x) * cos(m * pi * y) - cos(m * pi * x) * cos(n * pi * y);
vec3 c = mix(
vec3(0.9,0.9,0.9),
vec3(0.1,0.1,0.1),
floor(a + slider_a));
gl_FragColor = vec4(c, 1);
}