home *** CD-ROM | disk | FTP | other *** search
/ GameStar 2006 January / Gamestar_80_2006-01_dvd.iso / Dema / splatmagazinerenegadepaintball_demo.exe / VShader072-000367133703.vsh < prev    next >
Text File  |  2005-10-13  |  2KB  |  87 lines

  1. ; This source file can be requested from NVLink.
  2. ; It could be re-assembled as a shader, but note that
  3. ; NVLink has already assembled this file into D3D opcodes
  4. ; You can ask NVLink for the constant and vertex slots from the API.
  5.  
  6. ; Total Instructions: 32
  7. ; Instructions removed by optimizer: 5
  8. ; Used Constants: 11
  9. ; Used Vertex Slots: 0
  10. ; Used Registers: 6
  11.  
  12. #define c_constants 0
  13. #define c_decompress_object_scale 1
  14. #define c_worldviewprojection_0 5
  15. #define c_worldviewprojection_1 6
  16. #define c_worldviewprojection_2 7
  17. #define c_worldviewprojection_3 8
  18. #define c_alpha_distance 10
  19. #define c_fogconst 9
  20. #define c_objectspace_eyeposition 3
  21. #define c_offset_const 2
  22. #define c_facing_up_vector 4
  23.  
  24. vs.1.1
  25.  
  26. ; f_move_uncompressed_position
  27.  
  28. ; f_decompress_normal
  29. mad r1, v3, c[c_constants].zzzz, -c[c_constants].yyyy
  30.  
  31. ; f_decompress_texture0
  32. mad r2.xy, v2.ywww, c[c_constants].wwww, v2.xzzz
  33. mad oT0.xy, r2.xyyy, c[c_decompress_object_scale].zzzz, -c[c_decompress_object_scale].wwww
  34.  
  35. ; f_move_fixed_localposition
  36.  
  37. ; f_move_fixed_localnormal
  38.  
  39. ; f_uncompress_facing_offset
  40. mad r3.xyz, v5.xyzz, c[c_offset_const].xxxx, -c[c_offset_const].yyyy
  41.  
  42. ; f_auto_face_normal_skew_up
  43. add r4, v0, -c[c_objectspace_eyeposition]
  44. mul r5.xyz, r1.yzxx, r4.zxyy
  45. mad r4.xyz, r1.zxyy, -r4.yzxx, r5.xyzz
  46. dp3 r4.w, r4.xyzz, r4.xyzz
  47. rsq r4.w, r4.wwww
  48. mul r4.xyz, r4.xyzz, r4.wwww
  49. mul r5.xyz, r4.yzxx, r1.zxyy
  50. mad r1.xyz, r4.zxyy, -r1.yzxx, r5.xyzz
  51. mad r1.xyz, r1.xyzz, r3.xxxx, v0.xyzz
  52. mad r4.xyz, r4.xyzz, r3.yyyy, r1.xyzz
  53. mad r3.xyz, c[c_facing_up_vector].xyzz, r3.zzzz, r4.xyzz
  54.  
  55. ; f_outputobjectpos_clipspace
  56. mov r3.w, c[c_constants].yyyy
  57. dp4 oPos.x, r3, c[c_worldviewprojection_0]
  58. dp4 oPos.y, r3, c[c_worldviewprojection_1]
  59. dp4 oPos.z, r3, c[c_worldviewprojection_2]
  60. dp4 oPos.w, r3, c[c_worldviewprojection_3]
  61.  
  62. ; f_set_vertexcolor
  63. mov r4, v14
  64.  
  65. ; f_create_objectspace_eyevector_local_viewer
  66. add r3, r3, -c[c_objectspace_eyeposition]
  67. dp3 r3.w, r3, r3
  68. rsq r1.w, r3.wwww
  69. mul r3, -r3, r1.wwww
  70.  
  71. ; f_calculate_linear_range_fog
  72. rcp r3.w, r1.wwww
  73. add r3.x, c[c_fogconst].yyyy, -r3.wwww
  74. mul r3.x, r3.xxxx, c[c_fogconst].zzzz
  75. add oFog, r3.xxxx, -c[c_fogconst].xxxx
  76.  
  77. ; f_write_default_texture
  78.  
  79. ; f_set_diffuse_alpha_distance
  80. rcp r1.w, r1.wwww
  81. mad oD0.w, r1.wwww, c[c_alpha_distance].yyyy, c[c_alpha_distance].xxxx
  82.  
  83. ; f_write_diffuse_result
  84. mov oD0.xyz, r4
  85.  
  86. ; end
  87.