Created
August 24, 2015 10:15
-
-
Save zackp30/dba0581738619aeb49ce to your computer and use it in GitHub Desktop.
glsl
This file contains 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
precision mediump float; | |
uniform float time; | |
uniform vec2 resolution; | |
void main( void ) | |
{ | |
float mx = max( resolution.x, resolution.y ); | |
vec2 uv = (gl_FragCoord.xy-resolution.xy*.5)/mx; | |
float angle = .76339745; | |
uv *= mat2( | |
cos( angle ), -sin( angle ), | |
sin( angle ), cos( angle ) ); | |
float fineness = mx*.4; | |
float sy = uv.y*fineness; | |
float c = fract( | |
sin( floor( sy )/fineness*12.9898 )* | |
47.54 ); | |
// streak anti-aliasing | |
float f = fract( sy ); | |
c *= min( f, 1.-f )*2.; | |
// highlights | |
c += sin( uv.y*31.414+time )*.5; | |
// background | |
float r = -uv.y+.5; | |
float b = uv.y+.13838383883 ; | |
gl_FragColor = vec4( | |
mix( | |
vec3( r, r*.3, b ), | |
vec3( c ), | |
.3 ), | |
2.0 ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment