Created
August 11, 2015 03:47
-
-
Save mk30/6be3ee0f9ff7df4dbfa1 to your computer and use it in GitHub Desktop.
shader template
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
| vec3 hsl2rgb(in float h, float s, float l) { | |
| vec3 rgb = clamp( abs(mod(h*6.0+vec3(0.0,4.0,2.0),6.0)-3.0)-1.0, 0.0, 1.0); | |
| return l + s * (rgb-0.5)*(1.0-abs(2.0*l-1.0)); | |
| } | |
| void mainImage(out vec4 fragColor, in vec2 fragCoord) { | |
| float t = iGlobalTime; | |
| vec2 uv = fragCoord.xy / iResolution.xy; | |
| float x = uv.x, y = uv.y; | |
| float h = 0.4 * t; | |
| float s = 1.0; | |
| float l = 0.4; | |
| fragColor = vec4(hsl2rgb(h, s, l), 1.0); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment