scene.org File Archive

File download

<root>­/­parties­/­2014­/­tokyodemofest14­/­7_lines_glsl_graphics_compo/surfing-on-sine-waves-wkter.txt.zip

File size:
2 610 bytes (2.55K)
File date:
2014-04-06 23:04:12
Download count:
all-time: 60

Preview

  • light_waves.txt 489B

file_id.diz

#ifdef GL_ES
precision mediump float;
#endif
uniform float time;uniform vec2 resolution;void main(void){vec2 r=resolution;
vec2 p=(gl_FragCoord.xy-.5*r)/min(r.x,r.y);vec3 c=vec3(0);float d=5./r.x;float
g=time;for(int j=5;j<18;j+=3){float k=float(j);for(int i=0;i<200;i++){float t=
float(i);c+=(((cos(g+(t*(k*4./1000.))))*.1*.006)/(length(p-vec2(-1.2+(t*2.*d),
-(cos(g+(t*(k*2./700.))))*.15))))*vec3(cos(g*(k/10.)+k*.60),cos(g*(k/10.)+k*
.20),cos(g*(k/10.)+k*.5));}}gl_FragColor=vec4(c,1);}