home *** CD-ROM | disk | FTP | other *** search
/ GameStar 2006 January / Gamestar_80_2006-01_dvd.iso / Dema / splatmagazinerenegadepaintball_demo.exe / VShader072-000419466247.vsh < prev    next >
Text File  |  2005-10-13  |  2KB  |  80 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: 25
  7. ; Instructions removed by optimizer: 3
  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_screen_const 2
  15. #define c_ambient_light 7
  16. #define c_worldviewprojection_0 3
  17. #define c_worldviewprojection_1 4
  18. #define c_worldviewprojection_2 5
  19. #define c_worldviewprojection_3 6
  20. #define c_heightfogplane 9
  21. #define c_heightfogconst 10
  22. #define c_objectspace_eyeposition 8
  23.  
  24. vs.1.0
  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 r1.xy, v2.ywww, c[c_constants].wwww, v2.xzzz
  33. mad oT0.xy, r1.xyyy, c[c_decompress_object_scale].zzzz, -c[c_decompress_object_scale].wwww
  34.  
  35. ; f_decompress_texture1
  36. mad r2.xy, v14.ywww, c[c_constants].wwww, v14.xzzz
  37. mul oT1.xy, r2.xyyy, c[c_screen_const].zzzz
  38.  
  39. ; f_move_fixed_localposition
  40. mov r0, v0
  41.  
  42. ; f_outputobjectpos_clipspace
  43. mov r0.w, c[c_constants].yyyy
  44. dp4 oPos.x, r0, c[c_worldviewprojection_0]
  45. dp4 oPos.y, r0, c[c_worldviewprojection_1]
  46. dp4 oPos.z, r0, c[c_worldviewprojection_2]
  47. dp4 oPos.w, r0, c[c_worldviewprojection_3]
  48.  
  49. ; f_set_ambient
  50. mov r3, c[c_ambient_light]
  51.  
  52. ; f_create_objectspace_eyevector_local_viewer
  53. add r4, r0, -c[c_objectspace_eyeposition]
  54. dp3 r4.w, r4, r4
  55. rsq r5.w, r4.wwww
  56. mul r4, -r4, r5.wwww
  57.  
  58. ; f_calculate_texture_height_fog
  59. mov r0.w, c[c_constants].yyyy
  60. dp4 r0.y, r0, c[c_heightfogplane]
  61. rcp r0.x, r5.wwww
  62. mul oT2.x, r0.xxxx, c[c_heightfogconst].xxxx
  63. add r5.x, -c[c_heightfogconst].yyyy, c[c_heightfogconst].wwww
  64. add oFog, c[c_constants].yyyy, r5.xxxx
  65.  
  66. ; f_output_texture_height_fog_t2
  67. mov oT2.y, r0.xyyy
  68.  
  69. ; f_write_default_texture
  70.  
  71. ; f_write_default_texture1
  72.  
  73. ; f_set_diffuse_alpha_ambient
  74. mov oD0.w, c[c_ambient_light].wwww
  75.  
  76. ; f_write_diffuse_result
  77. mov oD0.xyz, r3
  78.  
  79. ; end
  80.