home *** CD-ROM | disk | FTP | other *** search
/ GameStar Special 2004 January / GSSH0104TT.iso / Extras / Tron20 / tron_tools.exe / TRON_Tools / Tools / RenderStyles / vs_halo.vsh < prev    next >
Text File  |  2003-03-10  |  953b  |  40 lines

  1. ; Vertex Data:
  2. ;   v0    -  Position
  3. ;   v1    -  Normal
  4. ;   v2    -  uv1
  5. ;
  6. ; Constant Data:
  7. ;   c0    -  Constant Vector (Scale, 0.0, 1.0, 2.0)
  8. ;   c1:c4 -  ModelViewProj Matrix
  9. ;   c5    -  Light direction
  10. ;   c6      -  Light color
  11.  
  12. vs.1.1
  13.  
  14. // Scale normal by the requested scale (and add to new position)...
  15. mul r3,    v1,    c0.xxxy
  16. add r3,    v0,    r3
  17.  
  18. // transform position (all the way)...
  19. LT_MACRO_RIGIDTRANS4<oPos,r3,c6>            // Rigid Transform...
  20. LT_MACRO_SKINBLENDTRANS4<r0,r3,v3,v4,r1,c11>        // Skin Blended Transform...
  21. LT_MACRO_SKINTRANS4<oPos,r0,c2>                // Skin Projection...
  22.  
  23. // Output UVs...
  24. mov oT0,   v2
  25.  
  26. // Output Color
  27. mov oD0,   c1.xyz
  28.  
  29. // Figure out the vert alpha color (e dot n)
  30. add r0,    v0,    -c10                    // Compute the eye vector (in model space)...
  31. dp3 r0.w,  r0,    r0                    // Normalize it
  32. rsq r0.w,  r0.w
  33. mul r0,    r0,    r0.w
  34. dp3 r1.w,  r0,    v1                    // e dot n
  35. mul oD0.w, r1.w,  c1.w
  36.  
  37.  
  38.  
  39.  
  40.