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

  1. sampler s0 : register(s0); 
  2.  
  3. float4 p0 : register(c0); 
  4.  
  5. float4 p1 : register(c1); 
  6.  
  7.  
  8.  
  9. #define width (p0[0]) 
  10.  
  11. #define height (p0[1]) 
  12.  
  13.  
  14.  
  15. #define effect_width (2.0) 
  16.  
  17. #define val0 (2.15) 
  18.  
  19. #define val1 (-0.125) 
  20.  
  21.  
  22.  
  23. float4 main(float2 tex : TEXCOORD0) : COLOR 
  24.  
  25.  
  26.     float dx = effect_width/width; 
  27.  
  28.     float dy = effect_width/height; 
  29.  
  30.  
  31.  
  32.     float4 c1 = tex2D(s0, tex + float2(-dx,-dy)) * val1; 
  33.  
  34.     float4 c2 = tex2D(s0, tex + float2(0,-dy)) * val1; 
  35.  
  36.     float4 c3 = tex2D(s0, tex + float2(-dx,0)) * val1; 
  37.  
  38.     float4 c4 = tex2D(s0, tex + float2(dx,0)) * val1; 
  39.  
  40.     float4 c5 = tex2D(s0, tex + float2(0,dy)) * val1; 
  41.  
  42.     float4 c6 = tex2D(s0, tex + float2(dx,dy)) * val1; 
  43.  
  44.     float4 c7 = tex2D(s0, tex + float2(-dx,+dy)) * val1; 
  45.  
  46.     float4 c8 = tex2D(s0, tex + float2(+dx,-dy)) * val1; 
  47.  
  48.     float4 c9 = tex2D(s0, tex) * val0; 
  49.  
  50.     
  51.  
  52.     float4 c0 = (c1 + c2 + c3 + c4 + c5 + c6 + c7 + c8 + c9); 
  53.  
  54.     
  55.  
  56.     return c0; 
  57.  
  58. }