Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Paste into shadertoy.
- void mainImage( out vec4 fragColor, in vec2 fragCoord )
- {
- vec2 c = (2.0*iMouse.xy - iResolution.xy)/iResolution.y;
- vec2 p = (-iResolution.xy + 2.0*fragCoord)/iResolution.y;
- vec2 d = c - p;
- // angle of each pixel to the center offset by from
- float from = radians(mod(10.0*iTime,360.0));
- float a = (atan(d.x, d.y) + radians(180.0) - from)/radians(360.0);
- a = fract(a);
- vec3 col = vec3(0,0,0);
- col = vec3(a, a, a);
- fragColor = vec4( col, 1.0 );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement