home *** CD-ROM | disk | FTP | other *** search
/ PCGUIA 2010 Software/Programs / PCGuia_programas.iso / Software / Utils / SPlayer / SPlayerSetup.exe / splayer.exe / 2052 / FILE / 702 < prev    next >
Encoding:
Text File  |  2009-12-01  |  559 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 = 4/width;
  10.     float dy = 4/height;
  11.     
  12.     float4 c2 = tex2D(s0, tex + float2(0,-dy));
  13.     float4 c4 = tex2D(s0, tex + float2(-dx,0));
  14.     float4 c5 = tex2D(s0, tex + float2(0,0));
  15.     float4 c6 = tex2D(s0, tex + float2(dx,0));
  16.     float4 c8 = tex2D(s0, tex + float2(0,dy));
  17.     
  18.     float4 c0 = (-c2-c4+c5*4-c6-c8);
  19.     if(length(c0) < 1.0) c0 = float4(0,0,0,0);
  20.     else c0 = float4(1,1,1,0);
  21.     
  22.     return c0;
  23. }
  24.