home *** CD-ROM | disk | FTP | other *** search
/ BitJam / bitjam1-1.iso / interface / sign_of_life / distor.txt < prev    next >
Text File  |  2007-09-05  |  566b  |  18 lines

  1. float time_0_X:register(c0);
  2. float bands_speed:register(c1);
  3. float bands_amp:register(c2);
  4. sampler2D texture1:register(s0);
  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 < .208) || (x.y > .794)) return(0);
  11.     else {
  12.         float decal = ((((sin(xx.y * bands_speed + sin(time_0_X) * 1024)) * .5) + .5) - xx.x) * bands_amp;
  13.         color = tex2D(texture1, xx + decal) - bands_amp;
  14.         color -= decal;
  15.         return(color);
  16.     }
  17. }
  18.