URL: http://glslsandbox.com/e#25039.0
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | // Ripple Gradient Effect // By: Brandon Fogerty // bfogerty at gmail dot com // xdpixel.com #ifdef GL_ES precision mediump float; #endif uniform float time; uniform vec2 resolution; #define AMP_FALLOFF     (1.0-( clamp( length(uv), 0.0, 1.0 ) )) #define AMP         1.0 * AMP_FALLOFF #define K           10.0 #define C           -1.0 #define RADIUS          length( uv ) #define Background_Color    vec3( 0.0, 0.0, 0.5 ) void main( void )  {     vec2 uv = ( gl_FragCoord.xy / resolution.xy ) * 2.0 - 1.0;     uv.x *= (resolution.x / resolution.y);     float t = AMP * abs( sin( K * (RADIUS) + C * time ) );     t += abs( tan( uv.y ) * 4.0 );     vec3 finalColor =  Background_Color;     finalColor += vec3( t * 0.1, t * 0.2, t * 0.7 );     gl_FragColor = vec4( finalColor, 1.0 ); } |