home *** CD-ROM | disk | FTP | other *** search
/ CyberMycha 2008 January / Cybermycha 1_2008.iso / Data.cab / _BC461A47159C471BADDB509A08456091 < prev    next >
Encoding:
Text File  |  2004-05-28  |  337 b   |  21 lines

  1. regc(0, "TFACTOR")
  2.  
  3. hlsl("
  4.  
  5. sampler Image: register(s0);
  6.  
  7. const half4 TFactor : register(c0);
  8.  
  9. half4 main(half2 texCoord0: TEXCOORD0) : COLOR {
  10.  
  11.  
  12.     half size = TFactor.a;
  13.     half2 Pbase = texCoord0 - fmod(texCoord0,size.xx);
  14.     half2 PCenter = Pbase + (size/2.0).xx;
  15.     
  16.     return tex2D(Image, PCenter);
  17. }
  18.  
  19. ")
  20.  
  21.