Texture2D<float4> t5 : register(t5);

Texture2D<float4> t2 : register(t2);

Texture2D<float4> t1 : register(t1);

Texture2D<float4> t0 : register(t0);

SamplerState s5_s : register(s5);

SamplerState s2_s : register(s2);

SamplerState s1_s : register(s1);

SamplerState s0_s : register(s0);

cbuffer cb2 : register(b2)
{
  float4 cb2[7];
}

cbuffer cb12 : register(b12)
{
  float4 cb12[41];
}


Texture2D<float4> StereoParams : register(t125);
Texture1D<float4> IniParams : register(t120);

void main( 
  float4 v0 : SV_POSITION0,
  float4 v1 : TEXCOORD0,
  float4 v2 : TEXCOORD1,
  float4 v3 : TEXCOORD2,
  float4 v4 : TEXCOORD3,
  float4 v5 : TEXCOORD4,
  uint v6 : SV_IsFrontFace0,
  out float4 o0 : SV_Target0,
  out float2 o1 : SV_Target1,
  out float4 o2 : SV_Target2,
  out float4 o3 : SV_Target3,
  out float3 o4 : SV_Target4,
  out float2 o5 : SV_Target5)
{
  float4 r0,r1,r2,r3;
  uint4 bitmask, uiDest;
  float4 fDest;

  r0.x = v4.w;
  r0.y = v5.w;
  r0.zw = t0.Sample(s0_s, r0.xy).yw;
  r0.w = -cb2[1].w + r0.w;
  r0.z = log2(r0.z);
  r0.z = 0.454545468 * r0.z;
  r1.x = exp2(r0.z);
  r0.z = r0.w < 0;
  if (r0.z != 0) discard;
  r0.z = cb2[5].w == -1.000000;
  r0.w = -cb2[5].w * cb12[30].x + 1;
  r0.z = r0.z ? 1 : r0.w;
  r1.y = cb2[2].x;
  r1.xyzw = t5.SampleLevel(s5_s, r1.xy, 0).xyzw;
  o0.xyz = r1.xyz * r0.zzz;
  o0.w = cb2[0].z;
  r0.z = dot(v3.xyz, v3.xyz);
  r0.z = rsqrt(r0.z);
  r1.xyz = v3.xyz * r0.zzz;
  r0.zw = t1.Sample(s1_s, r0.xy).xy;
  r0.xy = t2.Sample(s2_s, r0.xy).xy;
  r2.xy = r0.zw * float2(2,2) + float2(-1,-1);
  r0.z = dot(r2.xy, r2.xy);
  r0.z = min(1, r0.z);
  r0.z = 1 + -r0.z;
  r0.z = sqrt(r0.z);
  r2.z = v6.x ? r0.z : -r0.z;
  r0.z = dot(r1.xyz, r2.xyz);
  r1.z = min(0, r0.z);
  r0.z = dot(v1.xyz, v1.xyz);
  r0.z = rsqrt(r0.z);
  r3.xyz = v1.xyz * r0.zzz;
  r1.x = dot(r3.xyz, r2.xyz);
  r0.z = dot(v2.xyz, v2.xyz);
  r0.z = rsqrt(r0.z);
  r3.xyz = v2.xyz * r0.zzz;
  r1.y = dot(r3.xyz, r2.xyz);
  r0.z = dot(r1.xyz, r1.xyz);
  r0.z = rsqrt(r0.z);
  r1.xyz = r1.xyz * r0.zzz;
  r0.z = r1.z * -8 + 8;
  r0.z = sqrt(r0.z);
  r0.zw = r1.xy / r0.zz;
  o1.xy = float2(0.5,0.5) + r0.zw;
  r0.z = cb2[6].w + -cb2[6].z;
  r0.w = cb2[6].w < 0;
  r0.w = r0.w ? 0 : cb12[30].x;
  r0.z = r0.w * r0.z + cb2[6].z;
  r0.w = cb2[6].w * r0.w;
  r1.x = 0 != cb2[6].y;
  r0.z = r1.x ? r0.z : r0.w;
  r0.z = 0.0199999996 * r0.z;
  o2.z = sqrt(r0.z);
  r0.z = 0 != cb12[30].x;
  r1.xy = float2(0,0) != cb2[5].xy;
  r0.z = r0.z ? r1.y : 0;
  r0.z = (int)r0.z | (int)r1.x;
  o2.x = r0.z ? 1.000000 : 0;
  o2.y = 0.00392156886 * cb2[6].x;
  o2.w = saturate(cb2[6].x);
  r0.y = r0.y * r1.w;
  r0.zw = cb2[3].xy + -cb2[0].xy;
  r0.zw = cb12[30].xx * r0.zw + cb2[0].xy;
  r0.zw = cb2[0].xy * r0.zw;
  r1.xy = cb2[3].xy >= float2(0,0);
  r0.zw = r1.xy ? r0.zw : cb2[0].xy;
  o3.x = r0.y * r0.z;
  r0.y = cb2[5].z * cb12[30].x;
  r0.z = -cb2[5].z * cb12[30].x + 1;
  r0.x = r0.x * r0.z + r0.y;
  o3.y = r0.x * r0.w;
  o3.z = 0.00999999978 * cb2[0].w;
  o3.w = 1;
  o4.xyz = cb2[1].xyz;
  r0.xyz = v4.xyz;
  r0.w = 1;
  r1.x = dot(cb12[37].xyzw, r0.xyzw);
  r1.y = dot(cb12[38].xyzw, r0.xyzw);
  r0.x = dot(cb12[40].xyzw, r0.xyzw);
  r0.xy = r1.xy / r0.xx;
  r1.xyz = v5.xyz;
  r1.w = 1;
  r2.x = dot(cb12[31].xyzw, r1.xyzw);
  r2.y = dot(cb12[32].xyzw, r1.xyzw);
  r0.z = dot(cb12[34].xyzw, r1.xyzw);
  r0.zw = r2.xy / r0.zz;
  r0.xy = r0.xy + -r0.zw;
  o5.xy = float2(-0.5,0.5) * r0.xy;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v1.2.9 on Tue Nov 24 02:10:46 2015
//
//
// Note: shader requires additional functionality:
//       Early depth-stencil
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   float       
// TEXCOORD                 0   xyz         1     NONE   float   xyz 
// TEXCOORD                 1   xyz         2     NONE   float   xyz 
// TEXCOORD                 2   xyz         3     NONE   float   xyz 
// TEXCOORD                 3   xyzw        4     NONE   float   xyzw
// TEXCOORD                 4   xyzw        5     NONE   float   xyzw
// SV_IsFrontFace           0   x           6    FFACE    uint   x   
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target                0   xyzw        0   TARGET   float   xyzw
// SV_Target                1   xy          1   TARGET   float   xy  
// SV_Target                2   xyzw        2   TARGET   float   xyzw
// SV_Target                3   xyzw        3   TARGET   float   xyzw
// SV_Target                4   xyz         4   TARGET   float   xyz 
// SV_Target                5   xy          5   TARGET   float   xy  
//
ps_5_0
dcl_globalFlags refactoringAllowed | forceEarlyDepthStencil
dcl_constantbuffer cb12[41], immediateIndexed
dcl_constantbuffer cb2[7], immediateIndexed
dcl_sampler s0, mode_default
dcl_sampler s1, mode_default
dcl_sampler s2, mode_default
dcl_sampler s5, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_resource_texture2d (float,float,float,float) t1
dcl_resource_texture2d (float,float,float,float) t2
dcl_resource_texture2d (float,float,float,float) t5
dcl_input_ps linear v1.xyz
dcl_input_ps linear v2.xyz
dcl_input_ps linear v3.xyz
dcl_input_ps linear v4.xyzw
dcl_input_ps linear v5.xyzw
dcl_input_ps_sgv v6.x, is_front_face
dcl_output o0.xyzw
dcl_output o1.xy
dcl_output o2.xyzw
dcl_output o3.xyzw
dcl_output o4.xyz
dcl_output o5.xy
dcl_temps 4
mov r0.x, v4.w
mov r0.y, v5.w
sample_indexable(texture2d)(float,float,float,float) r0.zw, r0.xyxx, t0.xzyw, s0
add r0.w, r0.w, -cb2[1].w
log r0.z, r0.z
mul r0.z, r0.z, l(0.454545468)
exp r1.x, r0.z
lt r0.z, r0.w, l(0.000000)
discard_nz r0.z
eq r0.z, cb2[5].w, l(-1.000000)
mad r0.w, -cb2[5].w, cb12[30].x, l(1.000000)
movc r0.z, r0.z, l(1.000000), r0.w
mov r1.y, cb2[2].x
sample_l_indexable(texture2d)(float,float,float,float) r1.xyzw, r1.xyxx, t5.xyzw, s5, l(0.000000)
mul o0.xyz, r0.zzzz, r1.xyzx
mov o0.w, cb2[0].z
dp3 r0.z, v3.xyzx, v3.xyzx
rsq r0.z, r0.z
mul r1.xyz, r0.zzzz, v3.xyzx
sample_indexable(texture2d)(float,float,float,float) r0.zw, r0.xyxx, t1.zwxy, s1
sample_indexable(texture2d)(float,float,float,float) r0.xy, r0.xyxx, t2.xyzw, s2
mad r2.xy, r0.zwzz, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
dp2 r0.z, r2.xyxx, r2.xyxx
min r0.z, r0.z, l(1.000000)
add r0.z, -r0.z, l(1.000000)
sqrt r0.z, r0.z
movc r2.z, v6.x, r0.z, -r0.z
dp3 r0.z, r1.xyzx, r2.xyzx
min r1.z, r0.z, l(0.000000)
dp3 r0.z, v1.xyzx, v1.xyzx
rsq r0.z, r0.z
mul r3.xyz, r0.zzzz, v1.xyzx
dp3 r1.x, r3.xyzx, r2.xyzx
dp3 r0.z, v2.xyzx, v2.xyzx
rsq r0.z, r0.z
mul r3.xyz, r0.zzzz, v2.xyzx
dp3 r1.y, r3.xyzx, r2.xyzx
dp3 r0.z, r1.xyzx, r1.xyzx
rsq r0.z, r0.z
mul r1.xyz, r0.zzzz, r1.xyzx
mad r0.z, r1.z, l(-8.000000), l(8.000000)
sqrt r0.z, r0.z
div r0.zw, r1.xxxy, r0.zzzz
add o1.xy, r0.zwzz, l(0.500000, 0.500000, 0.000000, 0.000000)
add r0.z, -cb2[6].z, cb2[6].w
lt r0.w, cb2[6].w, l(0.000000)
movc r0.w, r0.w, l(0), cb12[30].x
mad r0.z, r0.w, r0.z, cb2[6].z
mul r0.w, r0.w, cb2[6].w
ne r1.x, l(0.000000, 0.000000, 0.000000, 0.000000), cb2[6].y
movc r0.z, r1.x, r0.z, r0.w
mul r0.z, r0.z, l(0.020000)
sqrt o2.z, r0.z
ne r0.z, l(0.000000, 0.000000, 0.000000, 0.000000), cb12[30].x
ne r1.xy, l(0.000000, 0.000000, 0.000000, 0.000000), cb2[5].xyxx
and r0.z, r0.z, r1.y
or r0.z, r0.z, r1.x
and o2.x, r0.z, l(0x3f800000)
mul o2.y, cb2[6].x, l(0.00392156886)
mov_sat o2.w, cb2[6].x
mul r0.y, r1.w, r0.y
add r0.zw, -cb2[0].xxxy, cb2[3].xxxy
mad r0.zw, cb12[30].xxxx, r0.zzzw, cb2[0].xxxy
mul r0.zw, r0.zzzw, cb2[0].xxxy
ge r1.xy, cb2[3].xyxx, l(0.000000, 0.000000, 0.000000, 0.000000)
movc r0.zw, r1.xxxy, r0.zzzw, cb2[0].xxxy
mul o3.x, r0.z, r0.y
mul r0.y, cb12[30].x, cb2[5].z
mad r0.z, -cb2[5].z, cb12[30].x, l(1.000000)
mad r0.x, r0.x, r0.z, r0.y
mul o3.y, r0.w, r0.x
mul o3.z, cb2[0].w, l(0.010000)
mov o3.w, l(1.000000)
mov o4.xyz, cb2[1].xyzx
mov r0.xyz, v4.xyzx
mov r0.w, l(1.000000)
dp4 r1.x, cb12[37].xyzw, r0.xyzw
dp4 r1.y, cb12[38].xyzw, r0.xyzw
dp4 r0.x, cb12[40].xyzw, r0.xyzw
div r0.xy, r1.xyxx, r0.xxxx
mov r1.xyz, v5.xyzx
mov r1.w, l(1.000000)
dp4 r2.x, cb12[31].xyzw, r1.xyzw
dp4 r2.y, cb12[32].xyzw, r1.xyzw
dp4 r0.z, cb12[34].xyzw, r1.xyzw
div r0.zw, r2.xxxy, r0.zzzz
add r0.xy, -r0.zwzz, r0.xyxx
mul o5.xy, r0.xyxx, l(-0.500000, 0.500000, 0.000000, 0.000000)
ret 
// Approximately 0 instruction slots used

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