home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
GameStar 2006 January
/
Gamestar_80_2006-01_dvd.iso
/
Dema
/
splatmagazinerenegadepaintball_demo.exe
/
VShader072-000486540295.vsh
< prev
next >
Wrap
Text File
|
2005-10-13
|
2KB
|
64 lines
; 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: 19
; Instructions removed by optimizer: 2
; Used Constants: 9
; Used Vertex Slots: 0
; Used Registers: 4
#define c_constants 0
#define c_decompress_object_scale 1
#define c_ambient_light 6
#define c_worldviewprojection_0 2
#define c_worldviewprojection_1 3
#define c_worldviewprojection_2 4
#define c_worldviewprojection_3 5
#define c_fogconst 8
#define c_objectspace_eyeposition 7
vs.1.0
; f_move_uncompressed_position
; f_decompress_texture0
mad r1.xy, v2.ywww, c[c_constants].wwww, v2.xzzz
mad oT0.xy, r1.xyyy, c[c_decompress_object_scale].zzzz, -c[c_decompress_object_scale].wwww
; f_move_fixed_localposition
mov r0, v0
; 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 r2, c[c_ambient_light]
; f_create_objectspace_eyevector_local_viewer
add r0, r0, -c[c_objectspace_eyeposition]
dp3 r0.w, r0, r0
rsq r3.w, r0.wwww
mul r0, -r0, r3.wwww
; f_calculate_linear_range_fog
rcp r3.w, r3.wwww
add r3.x, c[c_fogconst].yyyy, -r3.wwww
mul r3.x, r3.xxxx, c[c_fogconst].zzzz
add oFog, r3.xxxx, -c[c_fogconst].xxxx
; f_write_default_texture
; f_set_diffuse_alpha_ambient
mov oD0.w, c[c_ambient_light].wwww
; f_write_diffuse_result
mov oD0.xyz, r2
; end