home *** CD-ROM | disk | FTP | other *** search
/ GameStar 2006 January / Gamestar_80_2006-01_dvd.iso / Dema / splatmagazinerenegadepaintball_demo.exe / VShader072-000151028743.vsh < prev    next >
Text File  |  2005-10-13  |  2KB  |  78 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: 26
  7. ; Instructions removed by optimizer: 2
  8. ; Used Constants: 10
  9. ; Used Vertex Slots: 0
  10. ; Used Registers: 5
  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_fogconst 9
  21. #define c_objectspace_eyeposition 8
  22.  
  23. vs.1.0
  24.  
  25. ; f_decompress_position
  26. mad r0.xy, v0.ywww, c[c_constants].wwww, v0.xzzz
  27. mad r0.zw, v1.yyyy, c[c_constants].wwww, v1.xxxx
  28. mad r0.xyz, r0.xyzz, c[c_decompress_object_scale].xxxx, -c[c_decompress_object_scale].yyyy
  29. mov r0.w, c[c_constants].yyyy
  30.  
  31. ; f_decompress_normal
  32. mad r1, v3, c[c_constants].zzzz, -c[c_constants].yyyy
  33.  
  34. ; f_decompress_texture0
  35. mad r1.xy, v2.ywww, c[c_constants].wwww, v2.xzzz
  36. mad oT0.xy, r1.xyyy, c[c_decompress_object_scale].zzzz, -c[c_decompress_object_scale].wwww
  37.  
  38. ; f_decompress_texture1
  39. mad r2.xy, v14.ywww, c[c_constants].wwww, v14.xzzz
  40. mul oT1.xy, r2.xyyy, c[c_screen_const].zzzz
  41.  
  42. ; f_move_fixed_localposition
  43. mov r0, r0
  44.  
  45. ; f_outputobjectpos_clipspace
  46. mov r0.w, c[c_constants].yyyy
  47. dp4 oPos.x, r0, c[c_worldviewprojection_0]
  48. dp4 oPos.y, r0, c[c_worldviewprojection_1]
  49. dp4 oPos.z, r0, c[c_worldviewprojection_2]
  50. dp4 oPos.w, r0, c[c_worldviewprojection_3]
  51.  
  52. ; f_set_ambient
  53. mov r3, c[c_ambient_light]
  54.  
  55. ; f_create_objectspace_eyevector_local_viewer
  56. add r0, r0, -c[c_objectspace_eyeposition]
  57. dp3 r0.w, r0, r0
  58. rsq r4.w, r0.wwww
  59. mul r0, -r0, r4.wwww
  60.  
  61. ; f_calculate_linear_range_fog
  62. rcp r4.w, r4.wwww
  63. add r4.x, c[c_fogconst].yyyy, -r4.wwww
  64. mul r4.x, r4.xxxx, c[c_fogconst].zzzz
  65. add oFog, r4.xxxx, -c[c_fogconst].xxxx
  66.  
  67. ; f_write_default_texture
  68.  
  69. ; f_write_default_texture1
  70.  
  71. ; f_set_diffuse_alpha_ambient
  72. mov oD0.w, c[c_ambient_light].wwww
  73.  
  74. ; f_write_diffuse_result
  75. mov oD0.xyz, r3
  76.  
  77. ; end
  78.