Skip to content

Instantly share code, notes, and snippets.

@radiodario
Created April 20, 2015 16:40
Show Gist options
  • Save radiodario/6472c7bc88918f5a9d7b to your computer and use it in GitHub Desktop.
Save radiodario/6472c7bc88918f5a9d7b to your computer and use it in GitHub Desktop.
nasty shader
uniform float time;
uniform vec2 resolution;
varying vec2 vUv;
void main( void ) {
float t = time;
vec2 uv = -1.0 + 2.0 *vUv;
uv.y *= 0.2;
uv *= mat2(.4,.3,-.3,.4)*10.;
float z = exp(-uv.y*uv.y*(2000.+1000.*cos(t*0.074+0.36)))*((2.+sin(t*0.035))*0.2)+0.8*cos(uv.y*11.0);
uv.x += 0.7 * sin(z+t*0.2)*0.3;
float d = sin(uv.x*120.)+0.3;
float aa = fwidth(d);
float c = smoothstep(-aa,aa,d);
gl_FragColor = vec4(c,c,c,1.0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment