home *** CD-ROM | disk | FTP | other *** search
/ Programming an RTS Game with Direct3D / Programming an RTS Game with Direct3D.iso / Examples / Chapter 7 / Example 7.4 / Debug / Shaders / unit.ps < prev   
Encoding:
Text File  |  2006-06-22  |  703 b   |  16 lines

  1. //////////////////////////////////////////////////////////////////////////
  2. //                                                                      //
  3. //                     Unit Lighting Pixelshader                        //
  4. //                                                                      //
  5. //                   Written by C. Granberg, 2006                       //
  6. //                                                                      //
  7. //////////////////////////////////////////////////////////////////////////
  8.  
  9. sampler text;
  10.  
  11. float4 Main(float2 UV : TEXCOORD0, float shade : TEXCOORD1) : COLOR
  12. {
  13.     float4 c0 = tex2D(text, UV);
  14.     float4 c1 = c0 * shade;
  15.     return c1;
  16. }