Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Shaders that will do anything to do nothing
- //Ludwik Janiuk
- uniform float time;
- varying vec4 myGlobalColor;
- float rand(vec2 co)
- {
- float a = 12.9898;
- float b = 78.233;
- float c = 43758.5453;
- float dt= dot(co.xy ,vec2(a,b));
- float sn= mod(dt,3.14);
- return fract(sin(sn) * c);
- }
- void main() {
- gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
- gl_Position = ftransform();
- myGlobalColor = gl_Color;
- float t = time/1000.0;
- float damping = 80.0;
- gl_Position.x += rand(gl_Position.yx + vec2(t, t))/damping;
- gl_Position.y += rand(gl_Position.xy + vec2(t, t))/damping;
- }
Advertisement
Add Comment
Please, Sign In to add comment