home *** CD-ROM | disk | FTP | other *** search
/ GameStar 2006 January / Gamestar_80_2006-01_dvd.iso / Dema / splatmagazinerenegadepaintball_demo.exe / VShader072-000367143943.vsh < prev    next >
Text File  |  2005-10-13  |  4KB  |  132 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: 65
  7. ; Instructions removed by optimizer: 4
  8. ; Used Constants: 19
  9. ; Used Vertex Slots: 0
  10. ; Used Registers: 7
  11.  
  12. #define c_constants 0
  13. #define c_decompress_object_scale 1
  14. #define c_screen_const 6
  15. #define c_worldviewprojection_0 12
  16. #define c_worldviewprojection_1 13
  17. #define c_worldviewprojection_2 14
  18. #define c_worldviewprojection_3 15
  19. #define c_alpha_distance 18
  20. #define c_heightfogplane 16
  21. #define c_heightfogconst 17
  22. #define c_objectspace_eyeposition 3
  23. #define c_offset_const 2
  24. #define c_facing_up_vector 4
  25. #define c_wavewarp_ref1 5
  26. #define c_wavewarp_ref2 7
  27. #define c_wavewarp_amt1 8
  28. #define c_wavewarp_amt2 9
  29. #define c_wavewarp_dir1 10
  30. #define c_wavewarp_dir2 11
  31.  
  32. vs.1.1
  33.  
  34. ; f_move_uncompressed_position
  35.  
  36. ; f_decompress_normal
  37. mad r1, v3, c[c_constants].zzzz, -c[c_constants].yyyy
  38.  
  39. ; f_decompress_texture0
  40. mad r2.xy, v2.ywww, c[c_constants].wwww, v2.xzzz
  41. mad oT0.xy, r2.xyyy, c[c_decompress_object_scale].zzzz, -c[c_decompress_object_scale].wwww
  42.  
  43. ; f_move_fixed_localposition
  44. mov r0, v0
  45.  
  46. ; f_move_fixed_localnormal
  47.  
  48. ; f_uncompress_facing_offset
  49. mad r3.xyz, v5.xyzz, c[c_offset_const].xxxx, -c[c_offset_const].yyyy
  50.  
  51. ; f_auto_face_normal_skew_up
  52. add r4, v0, -c[c_objectspace_eyeposition]
  53. mul r6.xyz, r1.yzxx, r4.zxyy
  54. mad r4.xyz, r1.zxyy, -r4.yzxx, r6.xyzz
  55. dp3 r4.w, r4.xyzz, r4.xyzz
  56. rsq r4.w, r4.wwww
  57. mul r4.xyz, r4.xyzz, r4.wwww
  58. mul r6.xyz, r4.yzxx, r1.zxyy
  59. mad r5.xyz, r4.zxyy, -r1.yzxx, r6.xyzz
  60. mad r0.xyz, r5.xyzz, r3.xxxx, v0.xyzz
  61. mad r0.xyz, r4.xyzz, r3.yyyy, r0.xyzz
  62. mad r0.xyz, c[c_facing_up_vector].xyzz, r3.zzzz, r0.xyzz
  63.  
  64. ; f_wavewarp
  65. dp4 r3.w, r0, c[c_wavewarp_ref1]
  66. expp r4.y, r3.wwww
  67. mad r4.x, r4.yyyy, c[c_constants].zzzz, -c[c_constants].yyyy
  68. mad r3.w, c[c_screen_const].xxxx, c[c_screen_const].xxxx, r3.wwww
  69. expp r3.y, r3.wwww
  70. mad r4.y, r3.yyyy, c[c_constants].zzzz, -c[c_constants].yyyy
  71. dp4 r3.w, r0, c[c_wavewarp_ref2]
  72. expp r5.y, r3.wwww
  73. mad r4.z, r5.yyyy, c[c_constants].zzzz, -c[c_constants].yyyy
  74. mad r3.w, c[c_screen_const].xxxx, c[c_screen_const].xxxx, r3.wwww
  75. expp r3.y, r3.wwww
  76. mad r4.w, r3.yyyy, c[c_constants].zzzz, -c[c_constants].yyyy
  77. mul r3, r4, r4
  78. mad r3, r3, r4, -r4
  79. mul r4.xyz, c[c_wavewarp_amt1].xyzz, v15.xyzz
  80. mul r5.xyz, c[c_wavewarp_amt2].xyzz, v15.xyzz
  81. mad r0.xyz, r4.xyzz, r3.xxxx, r0.xyzz
  82. mad r0.xyz, r5.xyzz, r3.zzzz, r0.xyzz
  83. dp3 r4.x, r1.xyzz, r4.xyzz
  84. mul r4.x, r4.xxxx, r3.yyyy
  85. mul r4.x, r4.xxxx, c[c_wavewarp_dir1].wwww
  86. dp3 r4.y, r1.xyzz, r5.xyzz
  87. mul r4.y, r4.yyyy, r3.wwww
  88. mul r4.y, r4.yyyy, c[c_wavewarp_dir2].wwww
  89. mad r1.xyz, c[c_wavewarp_dir1].xyzz, -r4.xxxx, r1.xyzz
  90. mad r4.xyz, c[c_wavewarp_dir2].xyzz, -r4.yyyy, r1.xyzz
  91. dp3 r4.w, r4.xyzz, r4.xyzz
  92. rsq r4.w, r4.wwww
  93. mul r4, r4, r4.wwww
  94.  
  95. ; f_outputobjectpos_clipspace
  96. mov r0.w, c[c_constants].yyyy
  97. dp4 oPos.x, r0, c[c_worldviewprojection_0]
  98. dp4 oPos.y, r0, c[c_worldviewprojection_1]
  99. dp4 oPos.z, r0, c[c_worldviewprojection_2]
  100. dp4 oPos.w, r0, c[c_worldviewprojection_3]
  101.  
  102. ; f_set_vertexcolor
  103. mov r4, v14
  104.  
  105. ; f_create_objectspace_eyevector_local_viewer
  106. add r1, r0, -c[c_objectspace_eyeposition]
  107. dp3 r1.w, r1, r1
  108. rsq r3.w, r1.wwww
  109. mul r1, -r1, r3.wwww
  110.  
  111. ; f_calculate_texture_height_fog
  112. mov r0.w, c[c_constants].yyyy
  113. dp4 r0.y, r0, c[c_heightfogplane]
  114. rcp r0.x, r3.wwww
  115. mul oT1.x, r0.xxxx, c[c_heightfogconst].xxxx
  116. add r1.x, -c[c_heightfogconst].yyyy, c[c_heightfogconst].wwww
  117. add oFog, c[c_constants].yyyy, r1.xxxx
  118.  
  119. ; f_output_texture_height_fog_t1
  120. mov oT1.y, r0.xyyy
  121.  
  122. ; f_write_default_texture
  123.  
  124. ; f_set_diffuse_alpha_distance
  125. rcp r3.w, r3.wwww
  126. mad oD0.w, r3.wwww, c[c_alpha_distance].yyyy, c[c_alpha_distance].xxxx
  127.  
  128. ; f_write_diffuse_result
  129. mov oD0.xyz, r4
  130.  
  131. ; end
  132.