Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifdef GL_ES
- precision mediump float;
- #endif
- #extension GL_OES_standard_derivatives : enable
- uniform float time;
- uniform vec2 mouse;
- uniform vec2 resolution;
- void main( void ) {
- vec2 position = ( gl_FragCoord.xy / resolution.xy );
- position.x = (position.x - 0.5) * (resolution.x / resolution.y) + 0.5;
- vec3 color = vec3(0, 0, 1);
- vec2 center = vec2(0.5);
- float dist = length(position - center) * 0.8;
- float angle = atan((position - center).y, (position - center).x);
- float xd = sin(angle * 10.0 + time) * 0.2 * dist;
- color += vec3(0.8, 0.8, -2.0) * 0.5 * max(0.0, sin((dist - time * 0.1) * 50.0)) * max(1.0, cos((angle + time * 0.5) * 10.0) * 1.5 * sin(angle * 80.0));
- color -= vec3(0.0, 1.0, 1.0) * max(0.0, cos((dist + xd - time * 0.1) * 100.0) * (1.0 - xd * (15.0 + 5.0 * cos(time))) * 0.5);
- color += smoothstep(vec3(1.0, 0.0, 0.0), vec3(0.0, 1.0, -1.0), vec3(dist * 2.0)) * max(0.0, cos((dist + xd - time * 0.1) * 100.0) * (1.0 - xd * (15.0 + 5.0 * cos(time))));
- color += vec3(0.0, 1.1, 0.0) * max(0.0, cos((dist * 0.2 + xd - time * 0.1) * 100.0) * (1.0 - xd * (15.0 + 5.0 * cos(-time)))) * 0.1;
- gl_FragColor = vec4( color, 1.0 );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement