Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void mainImage( out vec4 fragColor, in vec2 fragCoord )
- {
- // Normalized pixel coordinates (from 0 to 1)
- vec2 uv = fragCoord/iResolution.xy;
- vec2 m = iMouse.xy/iResolution.xy;
- uv.x *= iResolution.x/iResolution.y;
- m.x *= iResolution.x/iResolution.y;
- float d = smoothstep(0.70, 0.8, 1.-length(uv-m)) * cos(length(uv-m)*40.+iTime);
- // Time varying pixel color
- vec3 col = texture(iChannel0, uv + vec2(d * 0.01)).rgb;
- // Output to screen
- fragColor = vec4(col,1.0);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement