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

  1. sampler s0 : register(s0);
  2. float4 p0 : register(c0);
  3.  
  4. #define width (p0[0])
  5. #define height (p0[1])
  6. #define clock (p0[3])
  7.  
  8. #define PI acos(-1)
  9.  
  10. float4 main(float2 tex : TEXCOORD0) : COLOR
  11. {
  12.     float4 c0 = tex2D(s0, tex);
  13.     float3 lightsrc = float3(sin(clock*PI/1.5)/2+0.5,cos(clock*PI)/2+0.5,1);
  14.     float3 light = normalize(lightsrc - float3(tex.x,tex.y,0));
  15.     c0 *= pow(dot(light, float3(0,0,1)), 50);
  16.     
  17.     return c0;
  18. }
  19.