home *** CD-ROM | disk | FTP | other *** search
/ BitJam / bitjam1-1.iso / interface / sign_of_life / flare.ps < prev    next >
Text File  |  2007-09-05  |  468b  |  20 lines

  1. float amp;
  2. float pos;
  3. float2 center;
  4. float4 main(float2 x:TEXCOORD0): COLOR {
  5.     float2 coords = x;
  6.     float4 color;
  7.     if((x.y < (.083 - pos)) || (x.y > (.669 + pos))) return(0);
  8.     else {
  9.         coords.x -= .5;
  10.         coords.y -= .5;
  11.         coords.x += center.x;
  12.         coords.y += center.y;
  13.         color.r = 1 - pow(dot(coords, coords*.2),amp);
  14.         color.g = color.r * .55;
  15.         color.b = color.r * .1;
  16.         color.a = color.r;
  17.         return color;
  18.     }
  19. }
  20.