#ifdef GL_ES precision mediump float; #endif #define PI 3.14159265359 uniform vec2 u_resolution; uniform vec2 u_mouse; uniform float u_time; float plot(vec2 st, float pct){ return smoothstep( pct-0.02, pct, st.y) - smoothstep( pct, pct+0.02, st.y); } void main() { vec2 st = gl_FragCoord.xy/u_resolution; // Smooth interpolation between 0.1 and 0.9 // float y = smoothstep(0.02,0.12,(st.x*0.2)); st -= 0.5; // becomes -0.5 to 0.5 st *= 12.0; float pct2 = 0.0; pct2 = distance(st,vec2(0.5)); float y3 = sin(cos((st.y)*(0.10)))-sin(st.x+st.y*02.2); float y = smoothstep(1.2-(sin(((y3)))*(cos(st.y/-9.2))),0.5,st.x) - smoothstep(0.5,0.1,(st.x*0.2))+(sin(st.x-(u_time*.412))); float y2 = smoothstep(04.91,02.5,st.y+st.x) - smoothstep(0.481,0.918,st.y); vec3 colorA = vec3(y*y2)-(y3-(0.14))*(sin(st.x-(u_time*.2412))); colorA = (1.0)*colorA*vec3(.020+(sin(((y3+y)))+(cos(pct2*-0.2))),0.120,(0.10+(sin(y3)))); float y4 = cos(cos((st.x)*(0.13)*sin(0.23))); float y5 = smoothstep(0.2,0.25,0.3) - smoothstep(0.25,0.31,(st.y*0.12)); float y6 = smoothstep(0.9+(st.x*0.012),0.1915,st.y+cos(st.y)) - smoothstep(0.641,0.8191,(st.x+st.y)*0.2); vec3 colorB = vec3(y4+y5)-(y3*(0.913))*(sin(st.x+(u_time*.1592))); colorB = (1.0)*colorB*vec3(.920,0.95030,(0.20-y6))*(sin(st.y-(u_time*.1412))); // a. The DISTANCE from the pixel to the center vec2 bl = step(vec2(0.5),st); float pct = bl.x * bl.y; vec3 colorMix = vec3(0.0); colorMix = mix(colorA*0.432, colorB+0.3892, 0.983*(sin(((y6+y2)))*(cos(pct2/-2.2)))); gl_FragColor = vec4(colorMix,1.0); }