Skip to content

Instantly share code, notes, and snippets.

@TideSofDarK
Created August 27, 2013 12:57
Show Gist options
  • Select an option

  • Save TideSofDarK/6353169 to your computer and use it in GitHub Desktop.

Select an option

Save TideSofDarK/6353169 to your computer and use it in GitHub Desktop.
//By Red_Squirrel
void main(void)
{
vec2 uv = gl_FragCoord.xy / vec2(1024,1024);
float a = 0.0;
a = pow(a*2.0 + sin(iGlobalTime*5.0), 5.0) * 0.5;
vec3 col;
col.r = texture2D( iChannel0, vec2(a+uv.x,uv.y+a) ).r;
col.g = texture2D( iChannel0, vec2(uv.x, uv.y)).g;
col.b = texture2D( iChannel0, vec2(a-uv.x,uv.y) ).b;
gl_FragColor = vec4(col,1.0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment