rye_sway.fp 287 B

1234567891011
  1. //mxd. Simple rye sway shader
  2. uniform float timer;
  3. const float pi = 3.14159265358979323846;
  4. const float sway_ammount = 0.1;
  5. vec4 Process(vec4 color)
  6. {
  7. vec2 t = gl_TexCoord[0].st;
  8. t.x += sin(pi * 0.5 * (t.y + timer * 0.5)) * sway_ammount * (1.0 - t.y);
  9. return getTexel(t) * color;
  10. }