//Eyes part to stereoize.
// ---- Created with 3Dmigoto v1.3.16 on Sat Oct  2 09:44:25 2021
//
//cbuffer vblock : register(b0)
//{
//  float4 vertexxyzscale : packoffset(c0);
//  float4 vertexxyzbias : packoffset(c1);
//  float4 mvpmatrixx : packoffset(c2);
//  float4 mvpmatrixy : packoffset(c3);
//  float4 mvpmatrixz : packoffset(c4);
//  float4 mvpmatrixw : packoffset(c5);
//  float4 vertexstscalebias : packoffset(c6);
//  float4 smatrix : packoffset(c7);
//  float4 tmatrix : packoffset(c8);
//  float4 modelmatrixx : packoffset(c9);
//  float4 modelmatrixy : packoffset(c10);
//  float4 modelmatrixz : packoffset(c11);
//  float4 globalvieworigin : packoffset(c12);
//  float4 inverseviewprojectionmatrixx : packoffset(c13);
//  float4 inverseviewprojectionmatrixy : packoffset(c14);
//  float4 inverseviewprojectionmatrixz : packoffset(c15);
//  float4 inverseviewprojectionmatrixw : packoffset(c16);
//}
//
//cbuffer skinningBlock : register(b1)
//{
//  float4 skinOffsets : packoffset(c0);
//  float4 hardwareSkinning : packoffset(c1);
//}
//
//cbuffer jointBufferBlock0 : register(b2)
//{
//  float4 matrices[768] : packoffset(c0);
//}
//
//
//
//// 3Dmigoto declarations
//#define cmp -
//Texture1D<float4> IniParams : register(t120);
//Texture2D<float4> StereoParams : register(t125);
//
//
//void main(
//  float4 v0 : POSITION0,
//  float2 v1 : TEXCOORD0,
//  float4 v2 : NORMAL0,
//  float4 v3 : TANGENT0,
//  float4 v4 : COLOR0,
//  float4 v5 : TEXCOORD3,
//  float4 v6 : TEXCOORD4,
//  out float4 o0 : TEXCOORD0,
//  out float4 o1 : TEXCOORD1,
//  out float4 o2 : TEXCOORD2,
//  out float4 o3 : TEXCOORD3,
//  out float4 o4 : TEXCOORD4,
//  out float4 o5 : TEXCOORD5,
//  out float4 o6 : TEXCOORD6,
//  out float4 o7 : SV_Position0)
//{
//  float4 r0,r1,r2,r3,r4,r5,r6,r7;
//  uint4 bitmask, uiDest;
//  float4 fDest;
//
//  o0.zw = float2(0,0);
//  r0.xy = v1.xy * vertexstscalebias.xy + vertexstscalebias.zw;
//  r0.z = 1;
//  o0.x = dot(r0.xyz, smatrix.xyw);
//  o0.y = dot(r0.xyz, tmatrix.xyw);
//  r0.x = v6.x + v6.y;
//  r0.x = v6.z + r0.x;
//  r0.x = v6.w + r0.x;
//  r0.x = v2.w + r0.x;
//  r0.x = v5.w + r0.x;
//  r0.x = 1 + -r0.x;
//  r1.xyzw = float4(765,765,765,765) * v4.xyzw;
//  r1.xyzw = (int4)r1.xyzw;
//  r2.xyzw = matrices[r1.y].xyzw * v6.xxxx;
//  r2.xyzw = matrices[r1.x].xyzw * r0.xxxx + r2.xyzw;
//  r2.xyzw = matrices[r1.z].xyzw * v6.yyyy + r2.xyzw;
//  r1.xyzw = matrices[r1.w].xyzw * v6.zzzz + r2.xyzw;
//  r0.yzw = float3(765,765,765) * v5.xyz;
//  r0.yzw = (int3)r0.yzw;
//  r1.xyzw = matrices[r0.y].xyzw * v6.wwww + r1.xyzw;
//  r1.xyzw = matrices[r0.z].xyzw * v2.wwww + r1.xyzw;
//  r1.xyzw = matrices[r0.w].xyzw * v5.wwww + r1.xyzw;
//  r0.yzw = v2.xyz * float3(2,2,2) + float3(-1,-1,-1);
//  r2.x = dot(r0.yzw, r0.yzw);
//  r2.x = rsqrt(r2.x);
//  r0.yzw = r2.xxx * r0.yzw;
//  r2.x = dot(r0.yzw, r1.xyz);
//  r3.xyzw = v4.xxyy * float4(765,765,765,765) + float4(1,2,1,2);
//  r3.xyzw = (int4)r3.xyzw;
//  r4.xyzw = matrices[r3.z].xyzw * v6.xxxx;
//  r4.xyzw = matrices[r3.x].xyzw * r0.xxxx + r4.xyzw;
//  r5.xyzw = v4.zzww * float4(765,765,765,765) + float4(1,2,1,2);
//  r5.xyzw = (int4)r5.xyzw;
//  r4.xyzw = matrices[r5.x].xyzw * v6.yyyy + r4.xyzw;
//  r4.xyzw = matrices[r5.z].xyzw * v6.zzzz + r4.xyzw;
//  r6.xyzw = v5.xxyy * float4(765,765,765,765) + float4(1,2,1,2);
//  r6.xyzw = (int4)r6.xyzw;
//  r4.xyzw = matrices[r6.x].xyzw * v6.wwww + r4.xyzw;
//  r4.xyzw = matrices[r6.z].xyzw * v2.wwww + r4.xyzw;
//  r3.xz = v5.zz * float2(765,765) + float2(1,2);
//  r3.xz = (int2)r3.xz;
//  r4.xyzw = matrices[r3.x].xyzw * v5.wwww + r4.xyzw;
//  r2.y = dot(r0.yzw, r4.xyz);
//  r7.xyzw = matrices[r3.w].xyzw * v6.xxxx;
//  r7.xyzw = matrices[r3.y].xyzw * r0.xxxx + r7.xyzw;
//  r7.xyzw = matrices[r5.y].xyzw * v6.yyyy + r7.xyzw;
//  r5.xyzw = matrices[r5.w].xyzw * v6.zzzz + r7.xyzw;
//  r5.xyzw = matrices[r6.y].xyzw * v6.wwww + r5.xyzw;
//  r5.xyzw = matrices[r6.w].xyzw * v2.wwww + r5.xyzw;
//  r3.xyzw = matrices[r3.z].xyzw * v5.wwww + r5.xyzw;
//  r2.z = dot(r0.yzw, r3.xyz);
//  r0.x = dot(r2.xyz, r2.xyz);
//  r0.x = rsqrt(r0.x);
//  r2.xyz = r2.xyz * r0.xxx;
//  r0.x = cmp(hardwareSkinning.x != 0.000000);
//  r0.yzw = r0.xxx ? r2.xyz : r0.yzw;
//  r2.xyzw = v3.xyzw * float4(2,2,2,2) + float4(-1,-1,-1,-1);
//  r5.x = dot(r2.xyz, r2.xyz);
//  r5.x = rsqrt(r5.x);
//  r2.xyz = r5.xxx * r2.xyz;
//  r5.y = dot(r2.xyz, r4.xyz);
//  r5.z = dot(r2.xyz, r3.xyz);
//  r5.x = dot(r2.xyz, r1.xyz);
//  r5.w = dot(r5.xyz, r5.xyz);
//  r5.w = rsqrt(r5.w);
//  r5.xyz = r5.xyz * r5.www;
//  r2.xyz = r0.xxx ? r5.xyz : r2.xyz;
//  r5.xyz = r2.yzx * r0.wyz;
//  r5.xyz = r0.zwy * r2.zxy + -r5.xyz;
//  r5.xyz = r5.xyz * r2.www;
//  r2.w = dot(r5.xyz, r5.xyz);
//  r2.w = rsqrt(r2.w);
//  r5.xyz = r5.xyz * r2.www;
//  o1.y = dot(r5.xyz, modelmatrixx.xyz);
//  o1.z = dot(r0.yzw, modelmatrixx.xyz);
//  o1.x = dot(r2.xyz, modelmatrixx.xyz);
//  o1.w = 1;
//  o2.x = dot(r2.xyz, modelmatrixy.xyz);
//  o3.x = dot(r2.xyz, modelmatrixz.xyz);
//  o2.z = dot(r0.yzw, modelmatrixy.xyz);
//  o3.z = dot(r0.yzw, modelmatrixz.xyz);
//  o2.y = dot(r5.xyz, modelmatrixy.xyz);
//  o3.y = dot(r5.xyz, modelmatrixz.xyz);
//  o2.w = 0;
//  o3.w = 0;
//  r2.xyzw = v0.xyzw * vertexxyzscale.xyzw + vertexxyzbias.xyzw;
//  r4.y = dot(r2.xyzw, r4.xyzw);
//  r4.z = dot(r2.xyzw, r3.xyzw);
//  r4.x = dot(r2.xyzw, r1.xyzw);
//  r4.w = 1;
//  r0.xyzw = r0.xxxx ? r4.xyzw : r2.xyzw;
//  r1.x = dot(r0.xyzw, modelmatrixx.xyzw);
//  r1.y = dot(r0.xyzw, modelmatrixy.xyzw);
//  r1.z = dot(r0.xyzw, modelmatrixz.xyzw);
//  o4.xyz = -globalvieworigin.xyz + r1.xyz;
//  o4.w = 1;
//  r1.x = dot(r0.xyzw, mvpmatrixx.xyzw);
//  r1.y = dot(r0.xyzw, mvpmatrixy.xyzw);
//  r1.w = dot(r0.xyzw, mvpmatrixw.xyzw);
//  o7.z = dot(r0.xyzw, mvpmatrixz.xyzw);
//  o5.x = dot(r1.xyww, inverseviewprojectionmatrixx.xyzw);
//  o5.y = dot(r1.xyww, inverseviewprojectionmatrixy.xyzw);
//  o5.z = dot(r1.xyww, inverseviewprojectionmatrixz.xyzw);
//  o5.w = dot(r1.xyww, inverseviewprojectionmatrixw.xyzw);
//  r1.z = -r1.w;
//  o6.x = dot(r1.xyzw, inverseviewprojectionmatrixx.xyzw);
//  o6.y = dot(r1.xyzw, inverseviewprojectionmatrixy.xyzw);
//  o6.z = dot(r1.xyzw, inverseviewprojectionmatrixz.xyzw);
//  o6.w = dot(r1.xyzw, inverseviewprojectionmatrixw.xyzw);
//  o7.xyw = r1.xyw;
//  return;
//}
//
///*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384
//
//   using 3Dmigoto v1.3.16 on Sat Oct  2 09:44:25 2021
//
//
// Buffer Definitions:
//
// cbuffer vblock
// {
//
//   float4 vertexxyzscale;             // Offset:    0 Size:    16
//   float4 vertexxyzbias;              // Offset:   16 Size:    16
//   float4 mvpmatrixx;                 // Offset:   32 Size:    16
//   float4 mvpmatrixy;                 // Offset:   48 Size:    16
//   float4 mvpmatrixz;                 // Offset:   64 Size:    16
//   float4 mvpmatrixw;                 // Offset:   80 Size:    16
//   float4 vertexstscalebias;          // Offset:   96 Size:    16
//   float4 smatrix;                    // Offset:  112 Size:    16
//   float4 tmatrix;                    // Offset:  128 Size:    16
//   float4 modelmatrixx;               // Offset:  144 Size:    16
//   float4 modelmatrixy;               // Offset:  160 Size:    16
//   float4 modelmatrixz;               // Offset:  176 Size:    16
//   float4 globalvieworigin;           // Offset:  192 Size:    16
//   float4 inverseviewprojectionmatrixx;// Offset:  208 Size:    16
//   float4 inverseviewprojectionmatrixy;// Offset:  224 Size:    16
//   float4 inverseviewprojectionmatrixz;// Offset:  240 Size:    16
//   float4 inverseviewprojectionmatrixw;// Offset:  256 Size:    16
//
// }
//
// cbuffer skinningBlock
// {
//
//   float4 skinOffsets;                // Offset:    0 Size:    16 [unused]
//   float4 hardwareSkinning;           // Offset:   16 Size:    16
//
// }
//
// cbuffer jointBufferBlock0
// {
//
//   float4 matrices[768];              // Offset:    0 Size: 12288
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// vblock                            cbuffer      NA          NA    0        1
// skinningBlock                     cbuffer      NA          NA    1        1
// jointBufferBlock0                 cbuffer      NA          NA    2        1
//
//
//
// 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
// TANGENT                  0   xyzw        3     NONE   float   xyzw
// COLOR                    0   xyzw        4     NONE   float   xyzw
// TEXCOORD                 3   xyzw        5     NONE   float   xyzw
// TEXCOORD                 4   xyzw        6     NONE   float   xyzw
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// TEXCOORD                 0   xyzw        0     NONE   float   xyzw
// TEXCOORD                 1   xyzw        1     NONE   float   xyzw
// TEXCOORD                 2   xyzw        2     NONE   float   xyzw
// TEXCOORD                 3   xyzw        3     NONE   float   xyzw
// TEXCOORD                 4   xyzw        4     NONE   float   xyzw
// TEXCOORD                 5   xyzw        5     NONE   float   xyzw
// TEXCOORD                 6   xyzw        6     NONE   float   xyzw
// SV_Position              0   xyzw        7      POS   float   xyzw
//
vs_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[17], immediateIndexed
dcl_constantbuffer cb1[2], immediateIndexed
dcl_constantbuffer cb2[768], dynamicIndexed
dcl_constantbuffer cb12[1], immediateIndexed
dcl_input v0.xyzw
dcl_input v1.xy
dcl_input v2.xyzw
dcl_input v3.xyzw
dcl_input v4.xyzw
dcl_input v5.xyzw
dcl_input v6.xyzw
dcl_output o0.xyzw
dcl_output o1.xyzw
dcl_output o2.xyzw
dcl_output o3.xyzw
dcl_output o4.xyzw
dcl_output o5.xyzw
dcl_output o6.xyzw
dcl_output_siv o7.xyzw, position
dcl_temps 29
dcl_resource_texture2d (float,float,float,float) t125
ld_indexable(texture2d)(float,float,float,float) r14.xyzw, l(0, 0, 0, 0), t125.xyzw
mov o0.zw, l(0,0,0,0)
mad r0.xy, v1.xyxx, cb0[6].xyxx, cb0[6].zwzz
mov r0.z, l(1.000000)
dp3 o0.x, r0.xyzx, cb0[7].xywx
dp3 o0.y, r0.xyzx, cb0[8].xywx
add r0.x, v6.y, v6.x
add r0.x, r0.x, v6.z
add r0.x, r0.x, v6.w
add r0.x, r0.x, v2.w
add r0.x, r0.x, v5.w
add r0.x, -r0.x, l(1.000000)
mul r1.xyzw, v4.xyzw, l(765.000000, 765.000000, 765.000000, 765.000000)
ftoi r1.xyzw, r1.xyzw
mul r2.xyzw, v6.xxxx, cb2[r1.y + 0].xyzw
mad r2.xyzw, cb2[r1.x + 0].xyzw, r0.xxxx, r2.xyzw
mad r2.xyzw, cb2[r1.z + 0].xyzw, v6.yyyy, r2.xyzw
mad r1.xyzw, cb2[r1.w + 0].xyzw, v6.zzzz, r2.xyzw
mul r0.yzw, v5.xxyz, l(0.000000, 765.000000, 765.000000, 765.000000)
ftoi r0.yzw, r0.yyzw
mad r1.xyzw, cb2[r0.y + 0].xyzw, v6.wwww, r1.xyzw
mad r1.xyzw, cb2[r0.z + 0].xyzw, v2.wwww, r1.xyzw
mad r1.xyzw, cb2[r0.w + 0].xyzw, v5.wwww, r1.xyzw
mad r0.yzw, v2.xxyz, l(0.000000, 2.000000, 2.000000, 2.000000), l(0.000000, -1.000000, -1.000000, -1.000000)
dp3 r2.x, r0.yzwy, r0.yzwy
rsq r2.x, r2.x
mul r0.yzw, r0.yyzw, r2.xxxx
dp3 r2.x, r0.yzwy, r1.xyzx
mad r3.xyzw, v4.xxyy, l(765.000000, 765.000000, 765.000000, 765.000000), l(1.000000, 2.000000, 1.000000, 2.000000)
ftoi r3.xyzw, r3.xyzw
mul r4.xyzw, v6.xxxx, cb2[r3.z + 0].xyzw
mad r4.xyzw, cb2[r3.x + 0].xyzw, r0.xxxx, r4.xyzw
mad r5.xyzw, v4.zzww, l(765.000000, 765.000000, 765.000000, 765.000000), l(1.000000, 2.000000, 1.000000, 2.000000)
ftoi r5.xyzw, r5.xyzw
mad r4.xyzw, cb2[r5.x + 0].xyzw, v6.yyyy, r4.xyzw
mad r4.xyzw, cb2[r5.z + 0].xyzw, v6.zzzz, r4.xyzw
mad r6.xyzw, v5.xxyy, l(765.000000, 765.000000, 765.000000, 765.000000), l(1.000000, 2.000000, 1.000000, 2.000000)
ftoi r6.xyzw, r6.xyzw
mad r4.xyzw, cb2[r6.x + 0].xyzw, v6.wwww, r4.xyzw
mad r4.xyzw, cb2[r6.z + 0].xyzw, v2.wwww, r4.xyzw
mad r3.xz, v5.zzzz, l(765.000000, 0.000000, 765.000000, 0.000000), l(1.000000, 0.000000, 2.000000, 0.000000)
ftoi r3.xz, r3.xxzx
mad r4.xyzw, cb2[r3.x + 0].xyzw, v5.wwww, r4.xyzw
dp3 r2.y, r0.yzwy, r4.xyzx
mul r7.xyzw, v6.xxxx, cb2[r3.w + 0].xyzw
mad r7.xyzw, cb2[r3.y + 0].xyzw, r0.xxxx, r7.xyzw
mad r7.xyzw, cb2[r5.y + 0].xyzw, v6.yyyy, r7.xyzw
mad r5.xyzw, cb2[r5.w + 0].xyzw, v6.zzzz, r7.xyzw
mad r5.xyzw, cb2[r6.y + 0].xyzw, v6.wwww, r5.xyzw
mad r5.xyzw, cb2[r6.w + 0].xyzw, v2.wwww, r5.xyzw
mad r3.xyzw, cb2[r3.z + 0].xyzw, v5.wwww, r5.xyzw
dp3 r2.z, r0.yzwy, r3.xyzx
dp3 r0.x, r2.xyzx, r2.xyzx
rsq r0.x, r0.x
mul r2.xyz, r0.xxxx, r2.xyzx
ne r0.x, cb1[1].x, l(0.000000)
movc r0.yzw, r0.xxxx, r2.xxyz, r0.yyzw
mad r2.xyzw, v3.xyzw, l(2.000000, 2.000000, 2.000000, 2.000000), l(-1.000000, -1.000000, -1.000000, -1.000000)
dp3 r5.x, r2.xyzx, r2.xyzx
rsq r5.x, r5.x
mul r2.xyz, r2.xyzx, r5.xxxx
dp3 r5.y, r2.xyzx, r4.xyzx
dp3 r5.z, r2.xyzx, r3.xyzx
dp3 r5.x, r2.xyzx, r1.xyzx
dp3 r5.w, r5.xyzx, r5.xyzx
rsq r5.w, r5.w
mul r5.xyz, r5.wwww, r5.xyzx
movc r2.xyz, r0.xxxx, r5.xyzx, r2.xyzx
mul r5.xyz, r0.wyzw, r2.yzxy
mad r5.xyz, r0.zwyz, r2.zxyz, -r5.xyzx
mul r5.xyz, r2.wwww, r5.xyzx
dp3 r2.w, r5.xyzx, r5.xyzx
rsq r2.w, r2.w
mul r5.xyz, r2.wwww, r5.xyzx
dp3 o1.y, r5.xyzx, cb0[9].xyzx
dp3 o1.z, r0.yzwy, cb0[9].xyzx
dp3 o1.x, r2.xyzx, cb0[9].xyzx
mov o1.w, l(1.000000)
dp3 o2.x, r2.xyzx, cb0[10].xyzx
dp3 o3.x, r2.xyzx, cb0[11].xyzx
dp3 o2.z, r0.yzwy, cb0[10].xyzx
dp3 o3.z, r0.yzwy, cb0[11].xyzx
dp3 o2.y, r5.xyzx, cb0[10].xyzx
dp3 o3.y, r5.xyzx, cb0[11].xyzx
mov o2.w, l(0)
mov o3.w, l(0)
mad r2.xyzw, v0.xyzw, cb0[0].xyzw, cb0[1].xyzw
dp4 r4.y, r2.xyzw, r4.xyzw
dp4 r4.z, r2.xyzw, r3.xyzw
dp4 r4.x, r2.xyzw, r1.xyzw
mov r4.w, l(1.000000)
movc r0.xyzw, r0.xxxx, r4.xyzw, r2.xyzw
dp4 r1.x, r0.xyzw, cb0[9].xyzw
dp4 r1.y, r0.xyzw, cb0[10].xyzw
dp4 r1.z, r0.xyzw, cb0[11].xyzw
add o4.xyz, r1.xyzx, -cb0[12].xyzx
mov o4.w, l(1.000000)
dp4 r1.x, r0.xyzw, cb0[2].xyzw
dp4 r1.y, r0.xyzw, cb0[3].xyzw
dp4 r1.w, r0.xyzw, cb0[5].xyzw
dp4 r17.z, r0.xyzw, cb0[4].xyzw
dp4 o5.x, r1.xyww, cb0[13].xyzw
dp4 o5.y, r1.xyww, cb0[14].xyzw
dp4 o5.z, r1.xyww, cb0[15].xyzw
dp4 o5.w, r1.xyww, cb0[16].xyzw
mov r1.z, -r1.w
dp4 o6.x, r1.xyzw, cb0[13].xyzw
dp4 o6.y, r1.xyzw, cb0[14].xyzw
dp4 o6.z, r1.xyzw, cb0[15].xyzw
dp4 o6.w, r1.xyzw, cb0[16].xyzw
mov r17.xyw, r1.xyxw

add r14.w, r17.w, -r14.y
mad r17.x, r14.x, r14.w, r17.x

mov o7.xyzw, r17.xyzw
ret
// Approximately 111 instruction slots used
