// ---- Created with 3Dmigoto v1.3.16 on Sat Jul 04 09:29:42 2020
cbuffer cb2 : register(b2)
{
  float4 cb2[15];
}

cbuffer cb1 : register(b1)
{
  float4 cb1[51];
}

cbuffer cb0 : register(b0)
{
  float4 cb0[13];
}



///////////////////////////////////HUDFIX AUTODEPTH///////////////////////////////////
// 3Dmigoto declarations
#define cmp -
Texture1D<float4> IniParams : register(t120);
Texture2D<float4> StereoParams : register(t125);

/////////////HUD FIX END declarations ///////////////

void main(
  float4 v0 : ATTRIBUTE0,
  float3 v1 : ATTRIBUTE1,
  float4 v2 : ATTRIBUTE2,
  float4 v3 : ATTRIBUTE3,
  float2 v4 : ATTRIBUTE4,
  out float4 o0 : TEXCOORD10,
  out float4 o1 : TEXCOORD11,
  out float4 o2 : TEXCOORD0,
  out float4 o3 : TEXCOORD7,
  out float4 o4 : TEXCOORD8,
  out float4 o5 : SV_POSITION0)
{
  float4 r0,r1,r2,r3,r4;
  uint4 bitmask, uiDest;
  float4 fDest;
float4 stereo = StereoParams.Load(0);
float4 tex_filter = IniParams.Load(int2(2,0));
float4 HudDepth = IniParams.Load(int2(20,0));
float4 CrosshairDepth = IniParams.Load(int2(21,0));
float4 AutoDepthSwith = IniParams.Load(int2(22,0));
float4 MenuIndicator = IniParams.Load(int2(23,0));
float4 AimIndicator = IniParams.Load(int2(24,0));
float4 InventoryMenuIndicator = IniParams.Load(int2(25,0));
float4 LeftHUD_X_ScreenDepth = IniParams.Load(int2(13,0));
float4 RightHUD_X_ScreenDepth = IniParams.Load(int2(14,0));
float4 UpperHUD_Y_ScreenDepth = IniParams.Load(int2(15,0));
float4 LowerHUD_Y_ScreenDepth = IniParams.Load(int2(16,0));
float4 AutoDepthAdjustDepth = IniParams.Load(int2(27,0));
float4 HUDToggle = IniParams.Load(int2(71,0));
float4 SubtitleDepthToggle = IniParams.Load(int2(75,0));
float4 SubtitleDepth = IniParams.Load(int2(74,0));
  o0.w = 0;
  r0.xyz = v1.xyz * float3(2,2,2) + float3(-1,-1,-1);
  r1.xyzw = v2.xyzw * float4(2,2,2,2) + float4(-1,-1,-1,-1);
  r2.xyz = r1.yzx * r0.xyz;
  r0.xyz = r1.xyz * r0.yzx + -r2.xyz;
  r0.xyz = r0.xyz * r1.www;
  r2.xyz = r0.xyz * r1.yzx;
  r0.xyz = r0.zxy * r1.zxy + -r2.xyz;
  r0.xyz = r0.xyz * r1.www;
  r2.xyz = cb2[14].yyy * cb2[1].xyz;
  r3.xyz = r2.xyz * r0.yyy;
  r2.xyz = r2.xyz * r1.yyy;
  r4.xyz = cb2[14].xxx * cb2[0].xyz;
  r0.xyw = r0.xxx * r4.xyz + r3.xyz;
  r2.xyz = r1.xxx * r4.xyz + r2.xyz;
  r3.xyz = cb2[14].zzz * cb2[2].xyz;
  o0.xyz = r0.zzz * r3.xyz + r0.xyw;
  o1.xyz = r1.zzz * r3.xyz + r2.xyz;
  o1.w = cb2[9].w * r1.w;
  o2.xy = v4.xy;
  o2.zw = float2(0,0);
  r0.xyz = cb2[1].xyz * v0.yyy;
  r0.xyz = cb2[0].xyz * v0.xxx + r0.xyz;
  r0.xyz = cb2[2].xyz * v0.zzz + r0.xyz;
  r1.xyz = cb2[3].xyz + cb1[50].xyz;
  r0.xyz = r1.xyz + r0.xyz;
  r1.xyz = -cb1[44].xyz + r0.xyz;
  r0.w = cmp(0.00999999978 < abs(r1.z));
  r0.w = r0.w ? r1.z : 0.00999999978;
  r0.w = cb0[8].y * r0.w;
  r0.w = max(-127, r0.w);
  r1.w = exp2(-r0.w);
  r1.w = 1 + -r1.w;
  r1.w = cb0[8].x * r1.w;
  r0.w = r1.w / r0.w;
  r1.w = dot(r1.xyz, r1.xyz);
  r2.x = rsqrt(r1.w);
  r2.y = r1.w * r2.x + -cb0[12].x;
  r1.w = r1.w * r2.x + -cb0[8].w;
  r1.xyz = r2.xxx * r1.xyz;
  r1.x = saturate(dot(r1.xyz, cb0[10].xyz));
  r1.x = log2(r1.x);
  r1.y = max(0, r1.w);
  r1.y = r1.y * r0.w;
  r1.y = exp2(-r1.y);
  r1.y = min(1, r1.y);
  r1.y = max(cb0[9].w, r1.y);
  r1.z = max(0, r2.y);
  r0.w = r1.z * r0.w;
  r0.w = exp2(-r0.w);
  r0.w = min(1, r0.w);
  r0.w = 1 + -r0.w;
  r1.z = max(9.99999997e-007, cb0[11].w);
  r1.z = min(1000, r1.z);
  r1.x = r1.z * r1.x;
  r1.x = exp2(r1.x);
  r1.xzw = cb0[11].xyz * r1.xxx;
  r1.xzw = r1.xzw * r0.www;
  r0.w = cmp(0 < cb0[10].w);
  r1.xzw = r0.www ? r1.xzw : 0;
  r0.w = 1 + -r1.y;
  o3.w = r1.y;
  o3.xyz = cb0[9].xyz * r0.www + r1.xzw;
  o4.xyz = r0.xyz;
  o4.w = 1;
  r1.xyzw = cb1[1].xyzw * r0.yyyy;
  r1.xyzw = r0.xxxx * cb1[0].xyzw + r1.xyzw;
  r0.xyzw = r0.zzzz * cb1[2].xyzw + r1.xyzw;
  o5.xyzw = cb1[3].xyzw + r0.xyzw;


o5.x+=stereo.x*HudDepth.x;


if(HUDToggle.x==2.0)
{
if(o5.y > -0.37 && o5.y < 0.37 && o5.x > -0.37 && o5.x < 0.37)
{
}
else
{
o5.x=0;
}
}
if(HUDToggle.x==0.0)
{
o5.x=0;
}

  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v1.3.16 on Sat Jul 04 09:29:42 2020
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// ATTRIBUTE                0   xyzw        0     NONE   float   xyz
// ATTRIBUTE                1   xyz         1     NONE   float   xyz
// ATTRIBUTE                2   xyzw        2     NONE   float   xyzw
// ATTRIBUTE                3   xyzw        3     NONE   float
// ATTRIBUTE                4   xy          4     NONE   float   xy
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// TEXCOORD                10   xyzw        0     NONE   float   xyzw
// TEXCOORD                11   xyzw        1     NONE   float   xyzw
// TEXCOORD                 0   xyzw        2     NONE   float   xyzw
// TEXCOORD                 7   xyzw        3     NONE   float   xyzw
// TEXCOORD                 8   xyzw        4     NONE   float   xyzw
// SV_POSITION              0   xyzw        5      POS   float   xyzw
//
vs_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[13], immediateIndexed
dcl_constantbuffer cb1[51], immediateIndexed
dcl_constantbuffer cb2[15], immediateIndexed
dcl_input v0.xyz
dcl_input v1.xyz
dcl_input v2.xyzw
dcl_input v4.xy
dcl_output o0.xyzw
dcl_output o1.xyzw
dcl_output o2.xyzw
dcl_output o3.xyzw
dcl_output o4.xyzw
dcl_output_siv o5.xyzw, position
dcl_temps 5
mov o0.w, l(0)
mad r0.xyz, v1.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), l(-1.000000, -1.000000, -1.000000, 0.000000)
mad r1.xyzw, v2.xyzw, l(2.000000, 2.000000, 2.000000, 2.000000), l(-1.000000, -1.000000, -1.000000, -1.000000)
mul r2.xyz, r0.xyzx, r1.yzxy
mad r0.xyz, r1.xyzx, r0.yzxy, -r2.xyzx
mul r0.xyz, r1.wwww, r0.xyzx
mul r2.xyz, r1.yzxy, r0.xyzx
mad r0.xyz, r0.zxyz, r1.zxyz, -r2.xyzx
mul r0.xyz, r1.wwww, r0.xyzx
mul r2.xyz, cb2[1].xyzx, cb2[14].yyyy
mul r3.xyz, r0.yyyy, r2.xyzx
mul r2.xyz, r1.yyyy, r2.xyzx
mul r4.xyz, cb2[0].xyzx, cb2[14].xxxx
mad r0.xyw, r0.xxxx, r4.xyxz, r3.xyxz
mad r2.xyz, r1.xxxx, r4.xyzx, r2.xyzx
mul r3.xyz, cb2[2].xyzx, cb2[14].zzzz
mad o0.xyz, r0.zzzz, r3.xyzx, r0.xywx
mad o1.xyz, r1.zzzz, r3.xyzx, r2.xyzx
mul o1.w, r1.w, cb2[9].w
mov o2.xy, v4.xyxx
mov o2.zw, l(0,0,0,0)
mul r0.xyz, v0.yyyy, cb2[1].xyzx
mad r0.xyz, cb2[0].xyzx, v0.xxxx, r0.xyzx
mad r0.xyz, cb2[2].xyzx, v0.zzzz, r0.xyzx
add r1.xyz, cb1[50].xyzx, cb2[3].xyzx
add r0.xyz, r0.xyzx, r1.xyzx
add r1.xyz, r0.xyzx, -cb1[44].xyzx
lt r0.w, l(0.010000), |r1.z|
movc r0.w, r0.w, r1.z, l(0.010000)
mul r0.w, r0.w, cb0[8].y
max r0.w, r0.w, l(-127.000000)
exp r1.w, -r0.w
add r1.w, -r1.w, l(1.000000)
mul r1.w, r1.w, cb0[8].x
div r0.w, r1.w, r0.w
dp3 r1.w, r1.xyzx, r1.xyzx
rsq r2.x, r1.w
mad r2.y, r1.w, r2.x, -cb0[12].x
mad r1.w, r1.w, r2.x, -cb0[8].w
mul r1.xyz, r1.xyzx, r2.xxxx
dp3_sat r1.x, r1.xyzx, cb0[10].xyzx
log r1.x, r1.x
max r1.y, r1.w, l(0.000000)
mul r1.y, r0.w, r1.y
exp r1.y, -r1.y
min r1.y, r1.y, l(1.000000)
max r1.y, r1.y, cb0[9].w
max r1.z, r2.y, l(0.000000)
mul r0.w, r0.w, r1.z
exp r0.w, -r0.w
min r0.w, r0.w, l(1.000000)
add r0.w, -r0.w, l(1.000000)
max r1.z, cb0[11].w, l(0.000001)
min r1.z, r1.z, l(1000.000000)
mul r1.x, r1.x, r1.z
exp r1.x, r1.x
mul r1.xzw, r1.xxxx, cb0[11].xxyz
mul r1.xzw, r0.wwww, r1.xxzw
lt r0.w, l(0.000000), cb0[10].w
and r1.xzw, r1.xxzw, r0.wwww
add r0.w, -r1.y, l(1.000000)
mov o3.w, r1.y
mad o3.xyz, cb0[9].xyzx, r0.wwww, r1.xzwx
mov o4.xyz, r0.xyzx
mov o4.w, l(1.000000)
mul r1.xyzw, r0.yyyy, cb1[1].xyzw
mad r1.xyzw, r0.xxxx, cb1[0].xyzw, r1.xyzw
mad r0.xyzw, r0.zzzz, cb1[2].xyzw, r1.xyzw
add o5.xyzw, r0.xyzw, cb1[3].xyzw
ret
// Approximately 0 instruction slots used

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
