home *** CD-ROM | disk | FTP | other *** search
- ; This source file can be requested from NVLink.
- ; It could be re-assembled as a shader, but note that
- ; NVLink has already assembled this file into D3D opcodes
- ; You can ask NVLink for the constant and vertex slots from the API.
-
- ; Total Instructions: 72
- ; Instructions removed by optimizer: 3
- ; Used Constants: 24
- ; Used Vertex Slots: 0
- ; Used Registers: 6
-
- #define c_constants 0
- #define c_decompress_object_scale 1
- #define c_screen_const 3
- #define c_ambient_light 13
- #define c_worldviewprojection_0 9
- #define c_worldviewprojection_1 10
- #define c_worldviewprojection_2 11
- #define c_worldviewprojection_3 12
- #define c_fogconst 15
- #define c_pointlight_diffuse_0 21
- #define c_pointlight_diffuse_1 23
- #define c_dirlight_diffuse_0 17
- #define c_dirlight_diffuse_1 19
- #define c_objectspace_eyeposition 14
- #define c_dirlight_direction_0 16
- #define c_dirlight_direction_1 18
- #define c_pointlight_position_0 20
- #define c_pointlight_position_1 22
- #define c_wavewarp_ref1 2
- #define c_wavewarp_ref2 4
- #define c_wavewarp_amt1 5
- #define c_wavewarp_amt2 6
- #define c_wavewarp_dir1 7
- #define c_wavewarp_dir2 8
-
- vs.1.1
-
- ; f_decompress_position
- mad r0.xy, v0.ywww, c[c_constants].wwww, v0.xzzz
- mad r0.zw, v1.yyyy, c[c_constants].wwww, v1.xxxx
- mad r0.xyz, r0.xyzz, c[c_decompress_object_scale].xxxx, -c[c_decompress_object_scale].yyyy
- mov r0.w, c[c_constants].yyyy
-
- ; f_decompress_normal
- mad r1, v3, c[c_constants].zzzz, -c[c_constants].yyyy
-
- ; f_decompress_texture0
- mad r2.xy, v2.ywww, c[c_constants].wwww, v2.xzzz
- mad oT0.xy, r2.xyyy, c[c_decompress_object_scale].zzzz, -c[c_decompress_object_scale].wwww
-
- ; f_move_fixed_localposition
-
- ; f_move_fixed_localnormal
-
- ; f_wavewarp
- dp4 r3.w, r0, c[c_wavewarp_ref1]
- expp r4.y, r3.wwww
- mad r4.x, r4.yyyy, c[c_constants].zzzz, -c[c_constants].yyyy
- mad r3.w, c[c_screen_const].xxxx, c[c_screen_const].xxxx, r3.wwww
- expp r3.y, r3.wwww
- mad r4.y, r3.yyyy, c[c_constants].zzzz, -c[c_constants].yyyy
- dp4 r3.w, r0, c[c_wavewarp_ref2]
- expp r5.y, r3.wwww
- mad r4.z, r5.yyyy, c[c_constants].zzzz, -c[c_constants].yyyy
- mad r3.w, c[c_screen_const].xxxx, c[c_screen_const].xxxx, r3.wwww
- expp r3.y, r3.wwww
- mad r4.w, r3.yyyy, c[c_constants].zzzz, -c[c_constants].yyyy
- mul r3, r4, r4
- mad r3, r3, r4, -r4
- mul r4.xyz, c[c_wavewarp_amt1].xyzz, v15.xyzz
- mul r5.xyz, c[c_wavewarp_amt2].xyzz, v15.xyzz
- mad r0.xyz, r4.xyzz, r3.xxxx, r0.xyzz
- mad r0.xyz, r5.xyzz, r3.zzzz, r0.xyzz
- dp3 r4.x, r1.xyzz, r4.xyzz
- mul r4.x, r4.xxxx, r3.yyyy
- mul r4.x, r4.xxxx, c[c_wavewarp_dir1].wwww
- dp3 r4.y, r1.xyzz, r5.xyzz
- mul r4.y, r4.yyyy, r3.wwww
- mul r4.y, r4.yyyy, c[c_wavewarp_dir2].wwww
- mad r1.xyz, c[c_wavewarp_dir1].xyzz, -r4.xxxx, r1.xyzz
- mad r4.xyz, c[c_wavewarp_dir2].xyzz, -r4.yyyy, r1.xyzz
- dp3 r4.w, r4.xyzz, r4.xyzz
- rsq r4.w, r4.wwww
- mul r4, r4, r4.wwww
-
- ; f_outputobjectpos_clipspace
- mov r0.w, c[c_constants].yyyy
- dp4 oPos.x, r0, c[c_worldviewprojection_0]
- dp4 oPos.y, r0, c[c_worldviewprojection_1]
- dp4 oPos.z, r0, c[c_worldviewprojection_2]
- dp4 oPos.w, r0, c[c_worldviewprojection_3]
-
- ; f_set_ambient
- mov r1, c[c_ambient_light]
-
- ; f_create_objectspace_eyevector_local_viewer
- add r3, r0, -c[c_objectspace_eyeposition]
- dp3 r3.w, r3, r3
- rsq r5.w, r3.wwww
- mul r3, -r3, r5.wwww
-
- ; f_calculate_linear_range_fog
- rcp r5.w, r5.wwww
- add r5.x, c[c_fogconst].yyyy, -r5.wwww
- mul r5.x, r5.xxxx, c[c_fogconst].zzzz
- add oFog, r5.xxxx, -c[c_fogconst].xxxx
-
- ; f_calculate_objectspace_directionallight_diffuse_intensity
- dp3 r5, r4, c[c_dirlight_direction_0]
-
- ; f_clamp_diffuse_exponentiate_specular
- lit r5, r5
-
- ; f_dirlight_accumulate_diffuse
- mad r5, r5.yyyy, c[c_dirlight_diffuse_0], r1
-
- ; f_calculate_objectspace_directionallight_diffuse_intensity
- dp3 r1, r4, c[c_dirlight_direction_1]
-
- ; f_clamp_diffuse_exponentiate_specular
- lit r1, r1
-
- ; f_dirlight_accumulate_diffuse
- mad r1, r1.yyyy, c[c_dirlight_diffuse_1], r5
-
- ; f_calculate_objectspace_pointlight_vector
- add r5, c[c_pointlight_position_0], -r0
- dp3 r5.w, r5, r5
- rsq r5.w, r5.wwww
- mul r5, r5, r5.wwww
-
- ; f_calculate_objectspace_pointlight_diffuse_intensity
- dp3 r5, r4, r5
-
- ; f_clamp_diffuse_exponentiate_specular
- lit r5, r5
-
- ; f_pointlight_accumulate_diffuse
- mad r5, r5.yyyy, c[c_pointlight_diffuse_0], r1
-
- ; f_calculate_objectspace_pointlight_vector
- add r0, c[c_pointlight_position_1], -r0
- dp3 r0.w, r0, r0
- rsq r0.w, r0.wwww
- mul r0, r0, r0.wwww
-
- ; f_calculate_objectspace_pointlight_diffuse_intensity
- dp3 r4, r4, r0
-
- ; f_clamp_diffuse_exponentiate_specular
- lit r4, r4
-
- ; f_pointlight_accumulate_diffuse
- mad r4, r4.yyyy, c[c_pointlight_diffuse_1], r5
-
- ; f_write_default_texture
-
- ; f_set_diffuse_alpha_ambient
- mov oD0.w, c[c_ambient_light].wwww
-
- ; f_write_diffuse_result
- mov oD0.xyz, r4
-
- ; end
-