Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #version 120
- uniform sampler2D fbo_texture;
- uniform float time;
- varying vec2 UV;
- float rand(vec2 arg)
- {
- return fract(sin(dot(arg, vec2(12.9898, 78.233))) * 43758.5453);
- }
- void main(void)
- {
- vec2 cPos = UV * 2 - 1;
- float cLength = length(cPos);
- vec2 uv = UV + cos(cLength * 100 + time * 10) * 0.0025;
- float argument = atan(time / 20) * sin(time * 10) * 5;
- uv = vec2(cos(argument), sin(argument)) / 50 + uv + (vec2(rand(time * UV), rand(1 + time * UV)) - 0.5) / (10 + 240 * atan(time / 20) * abs(sin(time * 3)));
- float r = abs(rand(vec2(rand(time * UV))) - 0.3);
- gl_FragColor = (r <= 0.0005 ? 1 : 0) + texture2D(fbo_texture, uv);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement