home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the 3D Game Programming Gurus / gurus.iso / DirectX / dx9sdkcp.exe / SDK (C++) / Samples / Media / fogshader.vsh < prev    next >
Encoding:
Text File  |  2002-11-12  |  349 b   |  23 lines

  1. vs.1.1
  2.  
  3. dcl_position v0
  4.  
  5. def c40, 0.0f,0.0f,0.0f,0.0f;
  6. ;transform into projection space
  7. m4x4 r0,v0,c8
  8. max r0.z,c40.z,r0.z //clamp to 0
  9. max r0.w,c12.x,r0.w //clamp to near clip plane
  10. mov oPos,r0
  11. add r0.w,r0.w,-c12.x
  12. mul r0.w,r0.w,c12.y
  13. ;Load into diffuse
  14. mov oD0.xyzw,r0.w
  15. ;load into texture
  16. mov oT0.x,r0.w
  17. mov oT0.y,c12.x
  18.  
  19.  
  20.  
  21.  
  22.  
  23.