// Helix Mod Fix: "Darksiders" by Eincrou
// Last Modified for Fix Version: 3 (December 15, 2012)
// Game Version: 1.1
// http://helixmod.blogspot.com/
// VS#487: Main HUD
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.27.952.3022
//
// Parameters:
//
//   float4 mvp[4];
//   float4 texgen[2];
//
//
// Registers:
//
//   Name         Reg   Size
//   ------------ ----- ----
//   mvp          c0       2
//   texgen       c4       2
//

    vs_3_0							// vs_2_0
def c220, 0.42, 9, 0.0625, 0	// def c220, x,y,z,w -- x is primary depth, y is secondary depth used for defined textures
    dcl_position v0  // pos<0,1,2,3>
    dcl_color v1  // color<0,1,2,3>
    dcl_color1 v2  // factor<0,1,2,3>
dcl_2d s0
dcl_position o0
dcl_color o1
dcl_color1 o2
dcl_texcoord o3.xy

#line 12 "E:\Steam\steamapps\common\Darksiders\memory"
    dp4 r2.x, v0, c0  // opos<0>	oPos.x
    dp4 r2.y, v0, c1  // opos<1>	oPos.y
    dp4 o3.x, v0, c4  // otc0<0>	oT0.x
    dp4 o3.y, v0, c5  // otc0<1>	oT0.y

#line 12
    mov r2.zw, v0  // opos<2,3>	oPos.zw

#line 16
    mov o1, v1  // ocolor<0,1,2,3>	oD0
    mov o2, v2  // ofactor<0,1,2,3>	oD1

texldl r1, c220.z, s0
mov r9.x, c251.x			// Move whether texture is defined (as per DX9Settings.ini) to temporary register r9.x
if_eq r9.x, c220.w			// Checks to see if texture is not defined (if r9.x is equal to zero)
	mul r1.x, r1.x, -c220.x	// Uses standard depth setting value from c220.x
else						// Else means the texture is defined in DX9Settings.ini
	mov r10.x, c220.y		// Move secondary depth setting value from c220.y to a temporary register
	mul r1.x, r1.x, -r10.x	// Uses secondary depth setting
endif
add r2.x, r2.x, -r1.x		// Adds r1 as calculated from above to vertex position temp. register
mov o0, r2 					// Move final vertex position to position output


// approximately 7 instruction slots used