Skip to content

Instantly share code, notes, and snippets.

@shawnlawson
Created March 31, 2017 18:32
Show Gist options
  • Save shawnlawson/d665ccd9c4a3d746b27c096925a28a3f to your computer and use it in GitHub Desktop.
Save shawnlawson/d665ccd9c4a3d746b27c096925a28a3f to your computer and use it in GitHub Desktop.
Force Experiment 006
void main() {
vec2 st = st(), stN = stN(); vec3 c = black;
float theta = atan(st.x, st.y) / PI2; float phi = log(length(st));
float k = 1. * bands.y + 2.; float a = mod(theta, PI2/k); a = abs(a - PI2/k/2.);
vec2 r = rotate(vec2(bands.y - bands.x) * 2., st, time * .2 + bands.x);
vec2 r2 = rotate(vec2(bands.x - bands.y) * 2., st, time * .2 - bands.x);
vec3 v = voronoi(vec3(r * 3. * bands.y + st, bands.y * .3 + time * .1));
vec3 v2 = voronoi(vec3(r2 * 3. * bands.z + st, bands.z * .3 + time * .1));
c = (1. -v.x) * min(orange, hsv2rgb(vec3(.9, sin(time), 1.))) * 1.5;
c += (1. - v2.x) * blue * 1.5;
vec3 bb = texture2D(backbuffer, stN).rgb;
c = mix(c, bb, .25 - .25 * length(bands));
// c = mix(c, bb, .2);
// c = pow(c * 1.8, 90. * white);
c = step(.5, c);
c = mix(c, bb, .9 + .05 * length(bands));
gl_FragColor=vec4(c, 1.0 );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment