home *** CD-ROM | disk | FTP | other *** search
/ Bitfellas Bitjam / bitfellasbitjamcdbitfellas2007.iso / interface / intro / distor.ps < prev    next >
Text File  |  2007-08-07  |  526b  |  18 lines

  1. float time_0_X;
  2. float bands_speed;
  3. float bands_amp;
  4. sampler2D texture1;
  5. float4 main(float2 x:texcoord):color {
  6.     float2 xx = x;
  7.     float4 color;
  8.     xx.y += sin(time_0_X + x.x * 15) * .01;
  9.     xx.y += sin(time_0_X + x.y * 15) * .01;
  10.     if((x.y < .11) || (x.y > .89)) return(0);
  11.     else {
  12.         float test = ((((sin(xx.y * bands_speed + sin(time_0_X) * 1024)) * .5) + .5) - xx.x) * bands_amp;
  13.         color = tex2D(texture1, xx + test) - bands_amp;
  14.         color -= test;
  15.         return(color);
  16.     }
  17. }
  18.