//Sovngarde skybox (clouds).
// ---- Created with 3Dmigoto v1.2.45 on Sat Oct 29 23:32:58 2016
cbuffer cb2 : register(b2)
{
  float4 cb2[3];
}

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

cbuffer cb0 : register(b0)
{
  float4 cb0[3];
}

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




// 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 float4 o1 : TEXCOORD0,
  out float4 o2 : COLOR0,
  out float4 o3 : COLOR1,
  out float o4 : TEXCOORD5)
{
  float4 r0,r1,r2,r3;
  uint4 bitmask, uiDest;
  float4 fDest;
  
  float4 stereo = StereoParams.Load(0);
  float separation = stereo.x;
  float convergence = stereo.y;
  
  r0.xyzw = cb2[0].xyzw * cb12[8].xxxx;
  r1.xyzw = cb2[1].xyzw * cb12[8].yyyy;
  r0.xyzw = r1.xyzw + r0.xyzw;
  r1.xyzw = cb2[2].xyzw * cb12[8].zzzz;
  r0.xyzw = r1.xyzw + r0.xyzw;
  r1.xyzw = float4(0,0,0,1) * cb12[8].wwww;
  r0.xyzw = r1.xyzw + r0.xyzw;
  r1.xyz = v0.xyz;
  r1.w = 1;
  r0.x = dot(r0.xyzw, r1.xyzw);
  r2.xyzw = cb2[0].xyzw * cb12[9].xxxx;
  r3.xyzw = cb2[1].xyzw * cb12[9].yyyy;
  r2.xyzw = r3.xyzw + r2.xyzw;
  r3.xyzw = cb2[2].xyzw * cb12[9].zzzz;
  r2.xyzw = r3.xyzw + r2.xyzw;
  r3.xyzw = float4(0,0,0,1) * cb12[9].wwww;
  r2.xyzw = r3.xyzw + r2.xyzw;
  r0.y = dot(r2.xyzw, r1.xyzw);
  r2.xyzw = cb2[0].xyzw * cb12[11].xxxx;
  r3.xyzw = cb2[1].xyzw * cb12[11].yyyy;
  r2.xyzw = r3.xyzw + r2.xyzw;
  r3.xyzw = cb2[2].xyzw * cb12[11].zzzz;
  r2.xyzw = r3.xyzw + r2.xyzw;
  r3.xyzw = float4(0,0,0,1) * cb12[11].wwww;
  r2.xyzw = r3.xyzw + r2.xyzw;
  r0.z = dot(r2.xyzw, r1.xyzw);
  o0.xyzw = r0.xyzz;
  o0.x+=separation*(convergence);
  r0.x = dot(r0.xyz, r0.xyz);
  r0.x = sqrt(r0.x);
  r0.x = saturate(r0.x * cb0[0].y + -cb0[0].x);
  r0.x = log2(r0.x);
  r0.x = cb0[0].z * r0.x;
  r0.x = exp2(r0.x);
  r0.x = min(cb0[0].w, r0.x);
  o1.xy = v1.xy * cb1[0].zw + cb1[0].xy;
  o1.zw = float2(1,0);
  o2.xyzw = v2.xyzw;
  r0.yzw = cb0[2].xyz + -cb0[1].xyz;
  o3.xyz = r0.xxx * r0.yzw + cb0[1].xyz;
  o3.w = r0.x;
  o4.x = cb0[1].w;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v1.2.45 on Sat Oct 29 23:32:58 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   xyzw        1     NONE   float   xyzw
// COLOR                    0   xyzw        2     NONE   float   xyzw
// COLOR                    1   xyzw        3     NONE   float   xyzw
// TEXCOORD                 5   x           4     NONE   float   x   
//
vs_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb12[12], immediateIndexed
dcl_constantbuffer cb0[3], immediateIndexed
dcl_constantbuffer cb1[1], immediateIndexed
dcl_constantbuffer cb2[3], immediateIndexed
dcl_input v0.xyz
dcl_input v1.xy
dcl_input v2.xyzw
dcl_output_siv o0.xyzw, position
dcl_output o1.xyzw
dcl_output o2.xyzw
dcl_output o3.xyzw
dcl_output o4.x
dcl_temps 4
mul [precise] r0.xyzw, cb12[8].xxxx, cb2[0].xyzw
mul [precise] r1.xyzw, cb12[8].yyyy, cb2[1].xyzw
add [precise] r0.xyzw, r0.xyzw, r1.xyzw
mul [precise] r1.xyzw, cb12[8].zzzz, cb2[2].xyzw
add [precise] r0.xyzw, r0.xyzw, r1.xyzw
mul [precise] r1.xyzw, cb12[8].wwww, l(0.000000, 0.000000, 0.000000, 1.000000)
add [precise] r0.xyzw, r0.xyzw, r1.xyzw
mov r1.xyz, v0.xyzx
mov r1.w, l(1.000000)
dp4 r0.x, r0.xyzw, r1.xyzw
mul [precise] r2.xyzw, cb12[9].xxxx, cb2[0].xyzw
mul [precise] r3.xyzw, cb12[9].yyyy, cb2[1].xyzw
add [precise] r2.xyzw, r2.xyzw, r3.xyzw
mul [precise] r3.xyzw, cb12[9].zzzz, cb2[2].xyzw
add [precise] r2.xyzw, r2.xyzw, r3.xyzw
mul [precise] r3.xyzw, cb12[9].wwww, l(0.000000, 0.000000, 0.000000, 1.000000)
add [precise] r2.xyzw, r2.xyzw, r3.xyzw
dp4 r0.y, r2.xyzw, r1.xyzw
mul [precise] r2.xyzw, cb12[11].xxxx, cb2[0].xyzw
mul [precise] r3.xyzw, cb12[11].yyyy, cb2[1].xyzw
add [precise] r2.xyzw, r2.xyzw, r3.xyzw
mul [precise] r3.xyzw, cb12[11].zzzz, cb2[2].xyzw
add [precise] r2.xyzw, r2.xyzw, r3.xyzw
mul [precise] r3.xyzw, cb12[11].wwww, l(0.000000, 0.000000, 0.000000, 1.000000)
add [precise] r2.xyzw, r2.xyzw, r3.xyzw
dp4 r0.z, r2.xyzw, r1.xyzw
mov o0.xyzw, r0.xyzz
dp3 r0.x, r0.xyzx, r0.xyzx
sqrt r0.x, r0.x
mad_sat r0.x, r0.x, cb0[0].y, -cb0[0].x
log r0.x, r0.x
mul r0.x, r0.x, cb0[0].z
exp r0.x, r0.x
min r0.x, r0.x, cb0[0].w
mad o1.xy, v1.xyxx, cb1[0].zwzz, cb1[0].xyxx
mov o1.zw, l(0,0,1.000000,0)
mov o2.xyzw, v2.xyzw
add r0.yzw, -cb0[1].xxyz, cb0[2].xxyz
mad o3.xyz, r0.xxxx, r0.yzwy, cb0[1].xyzx
mov o3.w, r0.x
mov o4.x, cb0[1].w
ret 
// Approximately 0 instruction slots used

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