home *** CD-ROM | disk | FTP | other *** search
/ GameStar 2006 January / Gamestar_80_2006-01_dvd.iso / Dema / splatmagazinerenegadepaintball_demo.exe / VShader072-000367135751.vsh < prev    next >
Text File  |  2005-10-13  |  3KB  |  93 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: 35
  7. ; Instructions removed by optimizer: 5
  8. ; Used Constants: 12
  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 11
  19. #define c_heightfogplane 9
  20. #define c_heightfogconst 10
  21. #define c_objectspace_eyeposition 3
  22. #define c_offset_const 2
  23. #define c_facing_up_vector 4
  24.  
  25. vs.1.1
  26.  
  27. ; f_move_uncompressed_position
  28.  
  29. ; f_decompress_normal
  30. mad r1, v3, c[c_constants].zzzz, -c[c_constants].yyyy
  31.  
  32. ; f_decompress_texture0
  33. mad r2.xy, v2.ywww, c[c_constants].wwww, v2.xzzz
  34. mad oT0.xy, r2.xyyy, c[c_decompress_object_scale].zzzz, -c[c_decompress_object_scale].wwww
  35.  
  36. ; f_move_fixed_localposition
  37.  
  38. ; f_move_fixed_localnormal
  39.  
  40. ; f_uncompress_facing_offset
  41. mad r3.xyz, v5.xyzz, c[c_offset_const].xxxx, -c[c_offset_const].yyyy
  42.  
  43. ; f_auto_face_normal_skew_up
  44. add r4, v0, -c[c_objectspace_eyeposition]
  45. mul r5.xyz, r1.yzxx, r4.zxyy
  46. mad r4.xyz, r1.zxyy, -r4.yzxx, r5.xyzz
  47. dp3 r4.w, r4.xyzz, r4.xyzz
  48. rsq r4.w, r4.wwww
  49. mul r4.xyz, r4.xyzz, r4.wwww
  50. mul r5.xyz, r4.yzxx, r1.zxyy
  51. mad r1.xyz, r4.zxyy, -r1.yzxx, r5.xyzz
  52. mad r1.xyz, r1.xyzz, r3.xxxx, v0.xyzz
  53. mad r4.xyz, r4.xyzz, r3.yyyy, r1.xyzz
  54. mad r3.xyz, c[c_facing_up_vector].xyzz, r3.zzzz, r4.xyzz
  55.  
  56. ; f_outputobjectpos_clipspace
  57. mov r3.w, c[c_constants].yyyy
  58. dp4 oPos.x, r3, c[c_worldviewprojection_0]
  59. dp4 oPos.y, r3, c[c_worldviewprojection_1]
  60. dp4 oPos.z, r3, c[c_worldviewprojection_2]
  61. dp4 oPos.w, r3, c[c_worldviewprojection_3]
  62.  
  63. ; f_set_vertexcolor
  64. mov r4, v14
  65.  
  66. ; f_create_objectspace_eyevector_local_viewer
  67. add r1, r3, -c[c_objectspace_eyeposition]
  68. dp3 r1.w, r1, r1
  69. rsq r0.w, r1.wwww
  70. mul r1, -r1, r0.wwww
  71.  
  72. ; f_calculate_texture_height_fog
  73. mov r3.w, c[c_constants].yyyy
  74. dp4 r3.y, r3, c[c_heightfogplane]
  75. rcp r3.x, r0.wwww
  76. mul oT1.x, r3.xxxx, c[c_heightfogconst].xxxx
  77. add r1.x, -c[c_heightfogconst].yyyy, c[c_heightfogconst].wwww
  78. add oFog, c[c_constants].yyyy, r1.xxxx
  79.  
  80. ; f_output_texture_height_fog_t1
  81. mov oT1.y, r3.xyyy
  82.  
  83. ; f_write_default_texture
  84.  
  85. ; f_set_diffuse_alpha_distance
  86. rcp r0.w, r0.wwww
  87. mad oD0.w, r0.wwww, c[c_alpha_distance].yyyy, c[c_alpha_distance].xxxx
  88.  
  89. ; f_write_diffuse_result
  90. mov oD0.xyz, r4
  91.  
  92. ; end
  93.