//Map geometry.
// ---- Created with 3Dmigoto v1.3.16 on Fri May 17 17:33:20 2019
cbuffer cb12 : register(b12)
{
  float4 cb12[16];
}

cbuffer cb10 : register(b10)
{
  float4 cb10[3];
}




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


void main(
  float4 v0 : POSITION0,
  float4 v1 : NORMAL0,
  float4 v2 : COLOR0,
  float2 v3 : TEXCOORD0,
  out float4 o0 : TEXCOORD0,
  out float3 o1 : TEXCOORD1,
  out float4 o2 : COLOR0,
  out float4 o3 : TEXCOORD2,
  out float4 o4 : SV_POSITION0)
{
  float4 r0,r1,r2;
  uint4 bitmask, uiDest;
  float4 fDest;

  float4 stereo = StereoParams.Load(0);

  r0.x = dot(cb10[0].xyzw, v0.xyzw);
  r0.y = dot(cb10[1].xyzw, v0.xyzw);
  r0.z = dot(cb10[2].xyzw, v0.xyzw);
  o0.xyz = r0.xyz;
  r1.xyz = v1.xyz * float3(2.00787401,2.00787401,2.00787401) + float3(-1,-1,-1);
  r2.x = dot(cb10[0].xyz, r1.xyz);
  r2.y = dot(cb10[1].xyz, r1.xyz);
  r2.z = dot(cb10[2].xyz, r1.xyz);
  r1.x = dot(r2.xyz, r2.xyz);
  r1.x = rsqrt(r1.x);
  o1.xyz = r2.xyz * r1.xxx;
  o2.xyzw = v2.xyzw;
  r0.w = 1;
  o3.x = dot(cb12[12].xyzw, r0.xyzw);
  o3.y = dot(cb12[13].xyzw, r0.xyzw);
  o3.z = dot(cb12[14].xyzw, r0.xyzw);
  o3.w = dot(cb12[15].xyzw, r0.xyzw);
  o4.x = dot(cb12[8].xyzw, r0.xyzw);
  o4.y = dot(cb12[9].xyzw, r0.xyzw);
  o4.z = dot(cb12[10].xyzw, r0.xyzw);
  o4.w = dot(cb12[11].xyzw, r0.xyzw);
  o4.x-=stereo.x*stereo.y*200;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v1.3.16 on Fri May 17 17:33:20 2019
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION                 0   xyzw        0     NONE   float   xyzw
// NORMAL                   0   xyzw        1     NONE   float   xyz
// COLOR                    0   xyzw        2     NONE   float   xyzw
// TEXCOORD                 0   xy          3     NONE   float
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// TEXCOORD                 0   xyz         0     NONE   float   xyz
// TEXCOORD                 1   xyz         1     NONE   float   xyz
// COLOR                    0   xyzw        2     NONE   float   xyzw
// TEXCOORD                 2   xyzw        3     NONE   float   xyzw
// SV_POSITION              0   xyzw        4      POS   float   xyzw
//
vs_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb10[3], immediateIndexed
dcl_constantbuffer cb12[16], immediateIndexed
dcl_input v0.xyzw
dcl_input v1.xyz
dcl_input v2.xyzw
dcl_output o0.xyz
dcl_output o1.xyz
dcl_output o2.xyzw
dcl_output o3.xyzw
dcl_output_siv o4.xyzw, position
dcl_temps 3
dp4 r0.x, cb10[0].xyzw, v0.xyzw
dp4 r0.y, cb10[1].xyzw, v0.xyzw
dp4 r0.z, cb10[2].xyzw, v0.xyzw
mov o0.xyz, r0.xyzx
mad r1.xyz, v1.xyzx, l(2.007874, 2.007874, 2.007874, 0.000000), l(-1.000000, -1.000000, -1.000000, 0.000000)
dp3 r2.x, cb10[0].xyzx, r1.xyzx
dp3 r2.y, cb10[1].xyzx, r1.xyzx
dp3 r2.z, cb10[2].xyzx, r1.xyzx
dp3 r1.x, r2.xyzx, r2.xyzx
rsq r1.x, r1.x
mul o1.xyz, r1.xxxx, r2.xyzx
mov o2.xyzw, v2.xyzw
mov r0.w, l(1.000000)
dp4 o3.x, cb12[12].xyzw, r0.xyzw
dp4 o3.y, cb12[13].xyzw, r0.xyzw
dp4 o3.z, cb12[14].xyzw, r0.xyzw
dp4 o3.w, cb12[15].xyzw, r0.xyzw
dp4 o4.x, cb12[8].xyzw, r0.xyzw
dp4 o4.y, cb12[9].xyzw, r0.xyzw
dp4 o4.z, cb12[10].xyzw, r0.xyzw
dp4 o4.w, cb12[11].xyzw, r0.xyzw
ret
// Approximately 0 instruction slots used

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