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