4 / squarewarps

SHADER

CODE

// Square Warps
// Lewis Lepton 2018
// https://lewislepton.com

#ifdef GL_ES
precision mediump float;
#endif

uniform vec2 u_resolution;
uniform vec2 u_mouse;
uniform float u_time;

const float PI = 3.141592;

void main(){
  vec2 p = (gl_FragCoord.xy / u_resolution.xy) - 0.5;
   
  vec3 nr = normalize(vec3(p / vec2(0.4 * length(4.3 * p * p * sin(p + u_time)) * 6.0 * 4.50), - 2.2 + sin(p / u_time)));

  gl_FragColor = vec4(nr.xyz * cos(nr.x + nr.z * u_time * 6.1) + fract(9.2 * p.y * nr.z + nr.x * sin(u_time * nr.z)), 0.66) * 0.76;
}

MORE...