//Workshop - List
cbuffer cb10 : register(b10)
{
  float4 cb10[180];
}

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

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

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


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

void main( 
  float4 v0 : POSITION0,
  float2 v1 : TEXCOORD0,
  float4 v2 : NORMAL0,
  float4 v3 : BINORMAL0,
  float4 v4 : BLENDWEIGHT0,
  float4 v5 : BLENDINDICES0,
  out float4 o0 : SV_POSITION0,
  out float4 o1 : TEXCOORD0,
  out float4 o2 : TEXCOORD4,
  out float4 o3 : TEXCOORD1,
  out float4 o4 : TEXCOORD2,
  out float4 o5 : TEXCOORD3,
  out float3 o6 : TEXCOORD5,
  out float4 o7 : COLOR0)
{
  float4 r0,r1,r2,r3,r4,r5,r6,r7,r8,r9;
  uint4 bitmask, uiDest;
  float4 fDest;

  r0.x = v4.x + v4.y;
  r0.x = saturate(v4.z + r0.x);
  r0.x = 1 + -r0.x;
  r1.xyz = float3(-0,-0,-0);
  r1.w = -cb12[35].z;
  r2.xyzw = float4(765.01001,765.01001,765.01001,765.01001) * v5.xyzw;
  r2.xyzw = (int4)r2.xyzw;
  r3.xyzw = (int4)r2.xxyy + int4(1,2,1,2);
  r4.xyzw = cb10[r3.w+0].xyzw + r1.zzzw;
  r4.xyzw = v4.yyyy * r4.xyzw;
  r5.xyzw = cb10[r3.y+0].xyzw + r1.zzzw;
  r4.xyzw = v4.xxxx * r5.xyzw + r4.xyzw;
  r5.xyzw = (int4)r2.zzww + int4(1,2,1,2);
  r6.xyzw = cb10[r5.y+0].xyzw + r1.zzzw;
  r1.xyzw = cb10[r5.w+0].xyzw + r1.xyzw;
  r4.xyzw = v4.zzzz * r6.xyzw + r4.xyzw;
  r1.xyzw = r0.xxxx * r1.xyzw + r4.xyzw;
  r4.xyz = v0.xyz;
  r4.w = 1;
  r6.z = dot(r4.xyzw, r1.xyzw);
  r7.xz = float2(-0,-0);
  r7.yw = -cb12[35].xy;
  r8.xyzw = cb10[r2.y+0].xyzw + r7.xxxy;
  r8.xyzw = v4.yyyy * r8.xyzw;
  r9.xyzw = cb10[r2.x+0].xyzw + r7.xxxy;
  r8.xyzw = v4.xxxx * r9.xyzw + r8.xyzw;
  r9.xyzw = cb10[r2.z+0].xyzw + r7.xxxy;
  r2.xyzw = cb10[r2.w+0].xyzw + r7.xxxy;
  r8.xyzw = v4.zzzz * r9.xyzw + r8.xyzw;
  r2.xyzw = r0.xxxx * r2.xyzw + r8.xyzw;
  r6.x = dot(r4.xyzw, r2.xyzw);
  r8.xyzw = cb10[r3.z+0].xyzw + r7.zzzw;
  r3.xyzw = cb10[r3.x+0].xyzw + r7.zzzw;
  r8.xyzw = v4.yyyy * r8.xyzw;
  r3.xyzw = v4.xxxx * r3.xyzw + r8.xyzw;
  r8.xyzw = cb10[r5.x+0].xyzw + r7.zzzw;
  r5.xyzw = cb10[r5.z+0].xyzw + r7.zzzw;
  r3.xyzw = v4.zzzz * r8.xyzw + r3.xyzw;
  r0.xyzw = r0.xxxx * r5.xyzw + r3.xyzw;
  r6.y = dot(r4.xyzw, r0.xyzw);
  r6.w = 1;
  o0.x = dot(cb12[8].xyzw, r6.xyzw);
  o0.y = dot(cb12[9].xyzw, r6.xyzw);
  o0.w = dot(cb12[11].xyzw, r6.xyzw);
  r0.w = dot(cb12[10].xyzw, r6.xyzw);
  o0.z = r0.w;
  
float4 s = StereoParams.Load(0);
float4 p = IniParams.Load(0);
// if (p.z == 1)
// {
	o0.x -= s.x * (o0.w - s.y)*p.z; //1.5;   
// }
  
  o2.w = r0.w;
  o1.xy = v1.xy * cb1[2].zw + cb1[2].xy;
  o2.xyz = r6.xyz;
  o6.xyz = cb2[3].xyz + -r6.xyz;
  r3.x = v0.w;
  r3.y = v2.w * 2 + -1;
  r3.z = v3.w * 2 + -1;
  r4.y = dot(r3.xyz, r0.xyz);
  r4.z = dot(r3.xyz, r1.xyz);
  r4.x = dot(r3.xyz, r2.xyz);
  r0.w = dot(r4.xyz, r4.xyz);
  r0.w = rsqrt(r0.w);
  r3.xyz = r4.xyz * r0.www;
  o3.x = r3.x;
  r4.xyz = v3.xyz * float3(2,2,2) + float3(-1,-1,-1);
  r5.y = dot(r4.xyz, r0.xyz);
  r5.z = dot(r4.xyz, r1.xyz);
  r5.x = dot(r4.xyz, r2.xyz);
  r0.w = dot(r5.xyz, r5.xyz);
  r0.w = rsqrt(r0.w);
  r4.xyz = r5.xyz * r0.www;
  o3.y = r4.x;
  r5.xyz = v2.xyz * float3(2,2,2) + float3(-1,-1,-1);
  r0.y = dot(r5.xyz, r0.xyz);
  r0.z = dot(r5.xyz, r1.xyz);
  r0.x = dot(r5.xyz, r2.xyz);
  r0.w = dot(r0.xyz, r0.xyz);
  r0.w = rsqrt(r0.w);
  r0.xyz = r0.xyz * r0.www;
  o3.z = r0.x;
  o4.x = r3.y;
  o5.x = r3.z;
  o4.y = r4.y;
  o5.y = r4.z;
  o4.z = r0.y;
  o5.z = r0.z;
  o7.xyzw = float4(1,1,1,1);
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v1.2.9 on Mon Nov 23 16:09:02 2015
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION                 0   xyzw        0     NONE   float   xyzw
// TEXCOORD                 0   xy          1     NONE   float   xy  
// NORMAL                   0   xyzw        2     NONE   float   xyzw
// BINORMAL                 0   xyzw        3     NONE   float   xyzw
// BLENDWEIGHT              0   xyzw        4     NONE   float   xyz 
// BLENDINDICES             0   xyzw        5     NONE   float   xyzw
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   float   xyzw
// TEXCOORD                 0   xy          1     NONE   float   xy  
// TEXCOORD                 4   xyzw        2     NONE   float   xyzw
// TEXCOORD                 1   xyz         3     NONE   float   xyz 
// TEXCOORD                 2   xyz         4     NONE   float   xyz 
// TEXCOORD                 3   xyz         5     NONE   float   xyz 
// TEXCOORD                 5   xyz         6     NONE   float   xyz 
// COLOR                    0   xyzw        7     NONE   float   xyzw
//
vs_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb12[36], immediateIndexed
dcl_constantbuffer cb1[3], immediateIndexed
dcl_constantbuffer cb2[4], immediateIndexed
dcl_constantbuffer cb10[180], dynamicIndexed
dcl_input v0.xyzw
dcl_input v1.xy
dcl_input v2.xyzw
dcl_input v3.xyzw
dcl_input v4.xyz
dcl_input v5.xyzw
dcl_output_siv o0.xyzw, position
dcl_output o1.xy
dcl_output o2.xyzw
dcl_output o3.xyz
dcl_output o4.xyz
dcl_output o5.xyz
dcl_output o6.xyz
dcl_output o7.xyzw
dcl_temps 10
add r0.x, v4.y, v4.x
add_sat r0.x, r0.x, v4.z
add r0.x, -r0.x, l(1.000000)
mov r1.xyz, l(-0.000000,-0.000000,-0.000000,0)
mov r1.w, -cb12[35].z
mul r2.xyzw, v5.xyzw, l(765.010010, 765.010010, 765.010010, 765.010010)
ftoi r2.xyzw, r2.xyzw
iadd r3.xyzw, r2.xxyy, l(1, 2, 1, 2)
add r4.xyzw, r1.zzzw, cb10[r3.w + 0].xyzw
mul r4.xyzw, r4.xyzw, v4.yyyy
add r5.xyzw, r1.zzzw, cb10[r3.y + 0].xyzw
mad r4.xyzw, v4.xxxx, r5.xyzw, r4.xyzw
iadd r5.xyzw, r2.zzww, l(1, 2, 1, 2)
add r6.xyzw, r1.zzzw, cb10[r5.y + 0].xyzw
add r1.xyzw, r1.xyzw, cb10[r5.w + 0].xyzw
mad r4.xyzw, v4.zzzz, r6.xyzw, r4.xyzw
mad r1.xyzw, r0.xxxx, r1.xyzw, r4.xyzw
mov r4.xyz, v0.xyzx
mov r4.w, l(1.000000)
dp4 r6.z, r4.xyzw, r1.xyzw
mov r7.xz, l(-0.000000,0,-0.000000,0)
mov r7.yw, -cb12[35].xxxy
add r8.xyzw, r7.xxxy, cb10[r2.y + 0].xyzw
mul r8.xyzw, r8.xyzw, v4.yyyy
add r9.xyzw, r7.xxxy, cb10[r2.x + 0].xyzw
mad r8.xyzw, v4.xxxx, r9.xyzw, r8.xyzw
add r9.xyzw, r7.xxxy, cb10[r2.z + 0].xyzw
add r2.xyzw, r7.xxxy, cb10[r2.w + 0].xyzw
mad r8.xyzw, v4.zzzz, r9.xyzw, r8.xyzw
mad r2.xyzw, r0.xxxx, r2.xyzw, r8.xyzw
dp4 r6.x, r4.xyzw, r2.xyzw
add r8.xyzw, r7.zzzw, cb10[r3.z + 0].xyzw
add r3.xyzw, r7.zzzw, cb10[r3.x + 0].xyzw
mul r8.xyzw, r8.xyzw, v4.yyyy
mad r3.xyzw, v4.xxxx, r3.xyzw, r8.xyzw
add r8.xyzw, r7.zzzw, cb10[r5.x + 0].xyzw
add r5.xyzw, r7.zzzw, cb10[r5.z + 0].xyzw
mad r3.xyzw, v4.zzzz, r8.xyzw, r3.xyzw
mad r0.xyzw, r0.xxxx, r5.xyzw, r3.xyzw
dp4 r6.y, r4.xyzw, r0.xyzw
mov r6.w, l(1.000000)
dp4 o0.x, cb12[8].xyzw, r6.xyzw
dp4 o0.y, cb12[9].xyzw, r6.xyzw
dp4 o0.w, cb12[11].xyzw, r6.xyzw
dp4 r0.w, cb12[10].xyzw, r6.xyzw
mov o0.z, r0.w
mov o2.w, r0.w
mad o1.xy, v1.xyxx, cb1[2].zwzz, cb1[2].xyxx
mov o2.xyz, r6.xyzx
add o6.xyz, -r6.xyzx, cb2[3].xyzx
mov r3.x, v0.w
mad r3.y, v2.w, l(2.000000), l(-1.000000)
mad r3.z, v3.w, l(2.000000), l(-1.000000)
dp3 r4.y, r3.xyzx, r0.xyzx
dp3 r4.z, r3.xyzx, r1.xyzx
dp3 r4.x, r3.xyzx, r2.xyzx
dp3 r0.w, r4.xyzx, r4.xyzx
rsq r0.w, r0.w
mul r3.xyz, r0.wwww, r4.xyzx
mov o3.x, r3.x
mad r4.xyz, v3.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), l(-1.000000, -1.000000, -1.000000, 0.000000)
dp3 r5.y, r4.xyzx, r0.xyzx
dp3 r5.z, r4.xyzx, r1.xyzx
dp3 r5.x, r4.xyzx, r2.xyzx
dp3 r0.w, r5.xyzx, r5.xyzx
rsq r0.w, r0.w
mul r4.xyz, r0.wwww, r5.xyzx
mov o3.y, r4.x
mad r5.xyz, v2.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), l(-1.000000, -1.000000, -1.000000, 0.000000)
dp3 r0.y, r5.xyzx, r0.xyzx
dp3 r0.z, r5.xyzx, r1.xyzx
dp3 r0.x, r5.xyzx, r2.xyzx
dp3 r0.w, r0.xyzx, r0.xyzx
rsq r0.w, r0.w
mul r0.xyz, r0.wwww, r0.xyzx
mov o3.z, r0.x
mov o4.x, r3.y
mov o5.x, r3.z
mov o4.y, r4.y
mov o5.y, r4.z
mov o4.z, r0.y
mov o5.z, r0.z
mov o7.xyzw, l(1.000000,1.000000,1.000000,1.000000)
ret 
// Approximately 0 instruction slots used

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