home *** CD-ROM | disk | FTP | other *** search
/ PCGUIA 2010 Software/Programs / PCGuia_programas.iso / Software / Utils / SPlayer / SPlayerSetup.exe / splayer.exe / 2052 / FILE / 704 < prev    next >
Encoding:
Text File  |  2009-12-01  |  569 b   |  24 lines

  1. sampler s0 : register(s0);
  2. float4 p0 : register(c0);
  3.  
  4. #define width (p0[0])
  5. #define height (p0[1])
  6.  
  7. float4 main(float2 tex : TEXCOORD0) : COLOR
  8. {
  9.     float dx = 1/width;
  10.     float dy = 1/height;
  11.     
  12.     float4 c1 = tex2D(s0, tex + float2(-dx,-dy));
  13.     float4 c2 = tex2D(s0, tex + float2(0,-dy));
  14.     float4 c4 = tex2D(s0, tex + float2(-dx,0));
  15.     float4 c6 = tex2D(s0, tex + float2(dx,0));
  16.     float4 c8 = tex2D(s0, tex + float2(0,dy));
  17.     float4 c9 = tex2D(s0, tex + float2(dx,dy));
  18.     
  19.     float4 c0 = (-c1-c2-c4+c6+c8+c9);
  20.     c0 = (c0.r+c0.g+c0.b)/3 + 0.5;
  21.     
  22.     return c0;
  23. }
  24.