scene.org File Archive

File download

<root>­/­parties­/­2014­/­tokyodemofest14­/­7_lines_glsl_graphics_compo/stripe-akegure.txt

File size:
527 bytes (527B)
File date:
2014-04-06 23:04:12
Download count:
all-time: 423

Preview

#ifdef GL_ES
precision mediump float;
#endif
uniform float time;uniform vec2 mouse,resolution;uniform sampler2D backbuffer;void main(
){vec2 u=(gl_FragCoord.xy/resolution),m=mouse-.5;vec4 c;float t=fract(time*(m.x+.5));
vec3 v=vec3(0);for(float i=0.;i<=20.;i+=1.){float p=2.*3.14*float(i)/20.;float x=cos(p+p
*t);float y=sin(3.*p+p*t);vec2 o=.2*vec2(x,y);v+=t*.01/(length(u-.5-o))*vec3(1);}c=vec4(
v.x,0.0,m.y,1);for(float j=0.;j<=1.;j+=.01){if(u.y>j&&u.y<j+t*.01){c=texture2D(
backbuffer,vec2(u.x,u.y+t*.2));}}gl_FragColor=c;}