Created
June 14, 2019 04:45
-
-
Save djg/8e82291d98d2c4b4e66fb0561dbc1b10 to your computer and use it in GitHub Desktop.
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 characters
// 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 ); | |
} |
Nexuapex
commented
Jun 14, 2019
•
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment