//Clouds 2.
// ---- Created with 3Dmigoto v1.2.45 on Sat Oct 29 15:54:50 2016
cbuffer cb2 : register(b2)
{
  float4 cb2[17];
}




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


void main( 
  float4 v0 : POSITION0,
  float2 v1 : TEXCOORD0,
  float4 v2 : COLOR0,
  out float4 o0 : SV_POSITION0,
  out float2 o1 : TEXCOORD0,
  out float2 p1 : TEXCOORD1,
  out float4 o2 : COLOR0,
  out float4 o3 : POSITION1,
  out float4 o4 : POSITION2)
{
  float4 r0,r1;
  uint4 bitmask, uiDest;
  float4 fDest;

  float4 stereo = StereoParams.Load(0);
  float separation = stereo.x;
  float convergence = stereo.y;
  
  r0.xyz = v0.xyz;
  r0.w = 1;
  r1.x = dot(cb2[0].xyzw, r0.xyzw);
  r1.y = dot(cb2[1].xyzw, r0.xyzw);
  r1.z = dot(cb2[3].xyzw, r0.xyzw);
  o0.xyzw = r1.xyzz;
o0.x+=separation*(convergence);
  //o1.xyzw = cb2[16].xyxy + v1.xyxy;
  o1.xy = cb2[16].xy + v1.xy;
p1.xy = cb2[16].xy + v1.xy;
  r1.xyz = cb2[14].xyz * v2.yyy;
  r1.xyz = cb2[13].xyz * v2.xxx + r1.xyz;
  r1.xyz = cb2[15].xyz * v2.zzz + r1.xyz;
  o2.xyz = cb2[12].www * r1.xyz;
  o2.w = cb2[13].w * v2.w;
  o3.x = dot(cb2[4].xyzw, r0.xyzw);
  o3.y = dot(cb2[5].xyzw, r0.xyzw);
  o3.z = dot(cb2[6].xyzw, r0.xyzw);
  o3.w = dot(cb2[7].xyzw, r0.xyzw);
  o4.x = dot(cb2[8].xyzw, r0.xyzw);
  o4.y = dot(cb2[9].xyzw, r0.xyzw);
  o4.z = dot(cb2[10].xyzw, r0.xyzw);
  o4.w = dot(cb2[11].xyzw, r0.xyzw);
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v1.2.45 on Sat Oct 29 15:54:50 2016
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION                 0   xyzw        0     NONE   float   xyz 
// TEXCOORD                 0   xy          1     NONE   float   xy  
// COLOR                    0   xyzw        2     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                 1     zw        1     NONE   float     zw
// COLOR                    0   xyzw        2     NONE   float   xyzw
// POSITION                 1   xyzw        3     NONE   float   xyzw
// POSITION                 2   xyzw        4     NONE   float   xyzw
//
vs_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb2[17], immediateIndexed
dcl_input v0.xyz
dcl_input v1.xy
dcl_input v2.xyzw
dcl_output_siv o0.xyzw, position
dcl_output o1.xy
dcl_output o1.zw
dcl_output o2.xyzw
dcl_output o3.xyzw
dcl_output o4.xyzw
dcl_temps 2
mov r0.xyz, v0.xyzx
mov r0.w, l(1.000000)
dp4 r1.x, cb2[0].xyzw, r0.xyzw
dp4 r1.y, cb2[1].xyzw, r0.xyzw
dp4 r1.z, cb2[3].xyzw, r0.xyzw
mov o0.xyzw, r1.xyzz
add o1.xyzw, v1.xyxy, cb2[16].xyxy
mul r1.xyz, v2.yyyy, cb2[14].xyzx
mad r1.xyz, cb2[13].xyzx, v2.xxxx, r1.xyzx
mad r1.xyz, cb2[15].xyzx, v2.zzzz, r1.xyzx
mul o2.xyz, r1.xyzx, cb2[12].wwww
mul o2.w, v2.w, cb2[13].w
dp4 o3.x, cb2[4].xyzw, r0.xyzw
dp4 o3.y, cb2[5].xyzw, r0.xyzw
dp4 o3.z, cb2[6].xyzw, r0.xyzw
dp4 o3.w, cb2[7].xyzw, r0.xyzw
dp4 o4.x, cb2[8].xyzw, r0.xyzw
dp4 o4.y, cb2[9].xyzw, r0.xyzw
dp4 o4.z, cb2[10].xyzw, r0.xyzw
dp4 o4.w, cb2[11].xyzw, r0.xyzw
ret 
// Approximately 0 instruction slots used

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