Back to shaders
Shader test bench
Op Art Checker Warp
runnable fragment
Complete GLSL fragment shader. Stronghold runs it directly when the browser can compile it.
Code
precision mediump float;
uniform vec2 resolution;
uniform float time;
void main(){
vec2 uv=(gl_FragCoord.xy*2.0-resolution.xy)/min(resolution.x,resolution.y);
float r=length(uv); float a=atan(uv.y,uv.x);
vec2 p=uv + 0.18*sin(vec2(uv.y,uv.x)*8.0+time) + 0.08*vec2(cos(a*6.0+time),sin(a*5.0-time));
float c=mod(floor(p.x*9.0)+floor(p.y*9.0),2.0);
float rings=0.5+0.5*sin(r*28.0-time*1.2);
vec3 col=mix(vec3(0.02),vec3(0.96),c); col=mix(col,col.bgr,rings*.35);
gl_FragColor=vec4(col,1.0);
}