Skip to content

Instantly share code, notes, and snippets.

vec4 box = vec4(0.0, 0, 0.3, 0.3);
void mainImage( out vec4 fragColor, in vec2 fragCoord )
{
box.x += 0.05 * iTime;
box.y -= 0.03 * iTime;
// Normalized pixel coordinates (from 0 to 1)
vec2 uv = fragCoord/iResolution.xy;
vec2 looped = uv / box.zw;