home *** CD-ROM | disk | FTP | other *** search
/ Chip 2006 February (Special) / Chip-Special_2006-02_Nero-7.bin / servis / mpc / mplayerc.exe / 1033 / FILE / 419 < prev   
Text File  |  2005-11-25  |  893b  |  30 lines

  1. sampler s0 : register(s0); 
  2. float4 p0 : register(c0); 
  3. float4 p1 : register(c1); 
  4.  
  5. #define effect_width (1.6) 
  6. #define val0 (2.0) 
  7. #define val1 (-0.125) 
  8.  
  9. #define width (p0[0]) 
  10. #define height (p0[1]) 
  11.  
  12. float4 main(float2 tex : TEXCOORD0) : COLOR 
  13.     float dx = effect_width/width; 
  14.     float dy = effect_width/height; 
  15.  
  16.     float4 c1 = tex2D(s0, tex + float2(-dx,-dy)) * val1; 
  17.     float4 c2 = tex2D(s0, tex + float2(0,-dy)) * val1; 
  18.     float4 c3 = tex2D(s0, tex + float2(-dx,0)) * val1; 
  19.     float4 c4 = tex2D(s0, tex + float2(dx,0)) * val1; 
  20.     float4 c5 = tex2D(s0, tex + float2(0,dy)) * val1; 
  21.     float4 c6 = tex2D(s0, tex + float2(dx,dy)) * val1; 
  22.     float4 c7 = tex2D(s0, tex + float2(-dx,+dy)) * val1; 
  23.     float4 c8 = tex2D(s0, tex + float2(+dx,-dy)) * val1; 
  24.     float4 c9 = tex2D(s0, tex) * val0; 
  25.     
  26.     float4 c0 = (c1 + c2 + c3 + c4 + c5 + c6 + c7 + c8 +c9); 
  27.     
  28.     return c0; 
  29. }