scene.org File Archive

File download

<root>­/­parties­/­2014­/­tokyodemofest14­/­7_lines_glsl_graphics_compo/kagayaki-effect-hamuha.txt

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

Screenshot (by pouët.net)

Screenshot

Preview

#ifdef GL_ES
precision mediump float;
#endif
uniform float time;uniform vec2 resolution;void main(){float s=0.;vec2 p=vec2(
gl_FragCoord.x,gl_FragCoord.y)/max(resolution.x,resolution.y);for(int i=0;i<
30;i++){float fi = float(i);float fr =fract(3.*time*(fi/30.));vec2 o=vec2(fi/
30.,fr+sin(fi));s+=.002*abs(sin(40.*time+fi))*(1./(pow(p.x-o.x,.2*fr))+1./(pow
(p.y-o.y,.2*fr)))*max(1./length(p-o)-1.,0.);}s+=.03/abs(p.x-abs(sin(floor(time
*2.))));vec3 c=s*abs(sin(time))*vec3(1.9+sin(time),1.8+cos(time),.8);
gl_FragColor=vec4(clamp(c,0.,1.),1.);}