Last active
April 16, 2017 15:44
-
-
Save shawnlawson/b2fb09e1d137bf96edf09d3a3b6a3df2 to your computer and use it in GitHub Desktop.
Revisions
-
Shawn Lawson revised this gist
Apr 16, 2017 . 1 changed file with 8 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,10 @@ void main() { vec2 st = st(), stN = stN(); vec3 c = white * .5; 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 pq = fract( st * (.01 + length(bands)*1.)); pq = rotate(vec2(0), pq, time - bands.z); pq = fract(pq); @@ -18,4 +24,5 @@ c = abs(sin((time - length(bands)) * 2.)) * hsv2rgb(vec3(time+1., .3, length(bands))) - step(.95 * white, c); gl_FragColor=vec4(c, 1.0 ); } -
Shawn Lawson created this gist
Apr 16, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,21 @@ vec2 pq = fract( st * (.01 + length(bands)*1.)); pq = rotate(vec2(0), pq, time - bands.z); pq = fract(pq); pq = rotate(vec2(0), pq, +time - bands.x ); pq = fract(pq); pq = rotate(vec2(0), pq, -time - bands.z ); pq = fract(pq); pq = rotate(vec2(0), pq, +time + bands.y); pq = fract(pq); pq = rotate(vec2(sin(time), cos(time)) * 3., pq+st, -time + bands.w); // pq = fract(pq); float f = fbm((pq ) * (1. + bands.x * 6.), 2 + int(bands.x* 2.)) * 2. - 1.; float f2 = fbm((pq) * (2. + bands.y * 4.), 2 + int(bands.y* 5.)) * 2. -1.; c += f * white; c += f2 * hsv2rgb(vec3(time, length(bands), .8)) * 2.; c = abs(sin((time - length(bands)) * 2.)) * hsv2rgb(vec3(time+1., .3, length(bands))) - step(.95 * white, c);