Debian Codegraph @

screensaver.shadertoy/resources/shaders/blobandscsanline.glsl

raw
1 // Taken from https://www.shadertoy.com/view/XdsGD8
2
3 float makePoint(float x,float y,float fx,float fy,float sx,float sy,float t){
4 float xx = x+sin(t*fx)*sx;
5 float yy = y+cos(t*fy)*sy;
6 return 1.0/sqrt(xx*xx+yy*yy);
7 }
8
9 void mainImage( out vec4 fragColor, in vec2 fragCoord ) {
10 vec2 p = (fragCoord.xy/iResolution.x)*2.0-vec2(1.0,iResolution.y/iResolution.x);
11 p = p*0.5;
12 float x = p.x;
13 float y = p.y;
14 float a = makePoint(x,y,3.3,2.9,0.2,0.1,iTime);
15 float b = makePoint(x,y,3.2,3.9,0.3,0.2,iTime);
16 float c = makePoint(x,y,3.7,0.3,0.5,0.3,iTime);
17 vec3 d = vec3(a,b,c)/32.0;
18 fragColor = vec4(d.x,d.y,d.z,1.0);
19 fragColor.rgb -= mod(fragCoord.y,2.0)<1.0 ? 0.5 : 0.0;
20 }