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

  1. vs.1.1
  2.  
  3. dcl_position v0
  4. dcl_texcoord v1
  5.  
  6. m4x4 oPos, v0, c3 ; transform position to the projection space
  7.  
  8. ; Compute vertex position in the camera space - this is our texture coordinates
  9. dp4 r0.x, v0, c0 
  10. dp4 r0.y, v0, c1 
  11. dp4 r0.z, v0, c2 
  12.  
  13. ; Do the rest of texture transform (first part was combined with the camera matrix) 
  14. rcp r0.z, r0.z 
  15. mad oT1.x, r0.x, r0.z, c8.x 
  16. mad oT1.y, r0.y, r0.z, c8.y 
  17.  
  18. mov oT0.xy, v1     ; Copy input texture coordinates for the stage 0;
  19.