2024-03-09 14:29:48 +01:00

21 lines
464 B
GLSL

// adapted from https://www.shadertoy.com/view/Xd3BWr
uniform vec2 uSize;
uniform float iTime;
vec2 iResolution;
out vec4 fragColor;
void main(void) {
iResolution = uSize;
vec2 fragCoord = gl_FragCoord.xy; // Get the fragment coordinates
// Normalized pixel coordinates (from 0 to 1)
vec2 uv = fragCoord/iResolution.xy;
float c = uv.x * 2.0 + iTime*2.0;
c = mod(c, 1.0);
c = step(c, 0.5);
fragColor = vec4(0.0, 0.0, 0.0, c);
}