I mapped the screen to the int variables x and y and played with various operations, as can be seen in my previous gifs. At this gif's core lies the following line: ((y * x) / (x ^ y)) == int(time * 30.0) ^ is the XOR operator.
Raw gif (gif) – Video (mp4) – Video (ogv) – Preview (png)
#version 300 es
precision highp float;
in vec2 UV;
out vec4 out_color;
uniform float ratio, time;
void main(void){
vec2 p = vec2(UV.x * ratio, UV.y) - vec2(0.5);
vec4 col = vec4(0.0);
int x = int(200.0 * p.x);
int y = int(200.0 * p.y);
if(((y * x) / (x ^ y)) == int(time * 30.0)){
col.rgb += 1.0;
}
col.a = 1.0;
out_color = col;
}
