Advertisement
Guest User

wobble

a guest
Aug 9th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void mainImage( out vec4 fragColor, in vec2 fragCoord )
  2. {
  3.     // Normalized pixel coordinates (from 0 to 1)
  4.     vec2 uv = fragCoord/iResolution.xy;
  5.     vec2 m = iMouse.xy/iResolution.xy;
  6.     uv.x *= iResolution.x/iResolution.y;
  7.    
  8.     m.x *= iResolution.x/iResolution.y;
  9.    
  10.     float d = smoothstep(0.70, 0.8, 1.-length(uv-m)) * cos(length(uv-m)*40.+iTime);
  11.  
  12.     // Time varying pixel color
  13.     vec3 col = texture(iChannel0, uv + vec2(d * 0.01)).rgb;
  14.  
  15.     // Output to screen
  16.     fragColor = vec4(col,1.0);
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement