//Skybox aurora.
// ---- Created with 3Dmigoto v1.2.45 on Sat Oct 29 16:32:47 2016
cbuffer cb10 : register(b10)
{
  float4 cb10[240];
}

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

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

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




// 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 : COLOR0,
  float4 v4 : BLENDWEIGHT0,
  float4 v5 : BLENDINDICES0,
  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,r4,r5,r6,r7,r8;
  uint4 bitmask, uiDest;
  float4 fDest;

  float4 stereo = StereoParams.Load(0);
  float separation = stereo.x;
  float convergence = stereo.y;
  
  r0.xyzw = float4(765.01001,765.01001,765.01001,765.01001) * v5.xyzw;
  r0.xyzw = (int4)r0.xyzw;
  r1.xz = float2(-0,-0);
  r1.yw = -cb12[40].xy;
  r2.xyzw = cb10[r0.x+0].xyzw + r1.xxxy;
  r2.xyzw = v4.xxxx * r2.xyzw;
  r3.xyzw = cb10[r0.y+0].xyzw + r1.xxxy;
  r3.xyzw = v4.yyyy * r3.xyzw;
  r2.xyzw = r3.xyzw + r2.xyzw;
  r3.xyzw = cb10[r0.z+0].xyzw + r1.xxxy;
  r3.xyzw = v4.zzzz * r3.xyzw;
  r2.xyzw = r3.xyzw + r2.xyzw;
  r3.xyzw = cb10[r0.w+0].xyzw + r1.xxxy;
  r3.xyzw = v4.wwww * r3.xyzw;
  r2.xyzw = r3.xyzw + r2.xyzw;
  r3.xyz = v0.xyz;
  r3.w = 1;
  r2.x = dot(r3.xyzw, r2.xyzw);
  r4.xyz = float3(-0,-0,-0);
  r4.w = -cb12[40].z;
  r5.xyzw = (int4)r0.xxyy + int4(1,2,1,2);
  r6.xyzw = cb10[r5.y+0].xyzw + r4.zzzw;
  r6.xyzw = v4.xxxx * r6.xyzw;
  r7.xyzw = cb10[r5.w+0].xyzw + r4.zzzw;
  r7.xyzw = v4.yyyy * r7.xyzw;
  r6.xyzw = r7.xyzw + r6.xyzw;
  r7.xyzw = (int4)r0.zzww + int4(1,2,1,2);
  r8.xyzw = cb10[r7.y+0].xyzw + r4.zzzw;
  r4.xyzw = cb10[r7.w+0].xyzw + r4.xyzw;
  r4.xyzw = v4.wwww * r4.xyzw;
  r8.xyzw = v4.zzzz * r8.xyzw;
  r6.xyzw = r8.xyzw + r6.xyzw;
  r4.xyzw = r6.xyzw + r4.xyzw;
  r2.z = dot(r3.xyzw, r4.xyzw);
  r2.w = 1;
  r4.xyzw = cb10[r5.x+0].xyzw + r1.zzzw;
  r4.xyzw = v4.xxxx * r4.xyzw;
  r6.xyzw = cb10[r5.z+0].xyzw + r1.zzzw;
  r6.xyzw = v4.yyyy * r6.xyzw;
  r4.xyzw = r6.xyzw + r4.xyzw;
  r6.xyzw = cb10[r7.x+0].xyzw + r1.zzzw;
  r1.xyzw = cb10[r7.z+0].xyzw + r1.zzzw;
  r1.xyzw = v4.wwww * r1.xyzw;
  r6.xyzw = v4.zzzz * r6.xyzw;
  r4.xyzw = r6.xyzw + r4.xyzw;
  r1.xyzw = r4.xyzw + r1.xyzw;
  r2.y = dot(r3.xyzw, r1.xyzw);
  r1.x = dot(cb12[8].xyzw, r2.xyzw);
  r1.y = dot(cb12[9].xyzw, r2.xyzw);
  r1.z = dot(cb12[11].xyzw, r2.xyzw);
  o0.xyzw = r1.xyzz;
  o0.x+=separation*(convergence);
  r1.x = dot(r1.xyz, r1.xyz);
  r1.x = sqrt(r1.x);
  r1.x = saturate(r1.x * cb0[0].y + -cb0[0].x);
  r1.x = log2(r1.x);
  r1.x = cb0[0].z * r1.x;
  r1.x = exp2(r1.x);
  r1.x = min(cb0[0].w, r1.x);
  r1.yzw = cb10[r0.y+0].xyz * v4.yyy;
  r1.yzw = v4.xxx * cb10[r0.x+0].xyz + r1.yzw;
  r0.xyz = v4.zzz * cb10[r0.z+0].xyz + r1.yzw;
  r0.xyz = v4.www * cb10[r0.w+0].xyz + r0.xyz;
  r1.yzw = v2.xyz * float3(2,2,2) + float3(-1,-1,-1);
  r0.x = dot(r1.yzw, r0.xyz);
  r3.xyz = cb10[r5.z+0].xyz * v4.yyy;
  r3.xyz = v4.xxx * cb10[r5.x+0].xyz + r3.xyz;
  r3.xyz = v4.zzz * cb10[r7.x+0].xyz + r3.xyz;
  r3.xyz = v4.www * cb10[r7.z+0].xyz + r3.xyz;
  r0.y = dot(r1.yzw, r3.xyz);
  r3.xyz = cb10[r5.w+0].xyz * v4.yyy;
  r3.xyz = v4.xxx * cb10[r5.y+0].xyz + r3.xyz;
  r3.xyz = v4.zzz * cb10[r7.y+0].xyz + r3.xyz;
  r3.xyz = v4.www * cb10[r7.w+0].xyz + r3.xyz;
  r0.z = dot(r1.yzw, r3.xyz);
  r0.w = dot(r0.xyz, r0.xyz);
  r0.w = rsqrt(r0.w);
  r0.xyz = r0.xyz * r0.www;
  r0.w = dot(-r2.xyz, -r2.xyz);
  r0.w = rsqrt(r0.w);
  r1.yzw = -r2.xyz * r0.www;
  r0.x = dot(r0.xyz, r1.yzw);
  r0.x = -cb1[2].x + abs(r0.x);
  r0.yz = cb1[2].yw + -cb1[2].xz;
  r0.x = saturate(r0.x / r0.y);
  r0.y = r0.x * r0.x;
  r0.x = -r0.x * 2 + 3;
  r0.x = r0.y * r0.x;
  o1.z = r0.x * r0.z + cb1[2].z;
  o1.xy = v1.xy * cb1[0].zw + cb1[0].xy;
  o1.w = 0;
  o2.xyzw = v3.xyzw;
  r0.xyz = cb0[2].xyz + -cb0[1].xyz;
  o3.xyz = r1.xxx * r0.xyz + cb0[1].xyz;
  o3.w = r1.x;
  o4.x = cb0[1].w;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v1.2.45 on Sat Oct 29 16:32:47 2016
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION                 0   xyzw        0     NONE   float   xyz 
// TEXCOORD                 0   xy          1     NONE   float   xy  
// NORMAL                   0   xyzw        2     NONE   float   xyz 
// COLOR                    0   xyzw        3     NONE   float   xyzw
// BLENDWEIGHT              0   xyzw        4     NONE   float   xyzw
// 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   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[41], immediateIndexed
dcl_constantbuffer cb0[3], immediateIndexed
dcl_constantbuffer cb1[3], immediateIndexed
dcl_constantbuffer cb10[240], dynamicIndexed
dcl_input v0.xyz
dcl_input v1.xy
dcl_input v2.xyz
dcl_input v3.xyzw
dcl_input v4.xyzw
dcl_input v5.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 9
mul [precise] r0.xyzw, v5.xyzw, l(765.010010, 765.010010, 765.010010, 765.010010)
ftoi [precise] r0.xyzw, r0.xyzw
mov [precise(xz)] r1.xz, l(-0.000000,0,-0.000000,0)
mov [precise(yw)] r1.yw, -cb12[40].xxxy
add [precise] r2.xyzw, r1.xxxy, cb10[r0.x + 0].xyzw
mul [precise] r2.xyzw, r2.xyzw, v4.xxxx
add [precise] r3.xyzw, r1.xxxy, cb10[r0.y + 0].xyzw
mul [precise] r3.xyzw, r3.xyzw, v4.yyyy
add [precise] r2.xyzw, r2.xyzw, r3.xyzw
add [precise] r3.xyzw, r1.xxxy, cb10[r0.z + 0].xyzw
mul [precise] r3.xyzw, r3.xyzw, v4.zzzz
add [precise] r2.xyzw, r2.xyzw, r3.xyzw
add [precise] r3.xyzw, r1.xxxy, cb10[r0.w + 0].xyzw
mul [precise] r3.xyzw, r3.xyzw, v4.wwww
add [precise] r2.xyzw, r2.xyzw, r3.xyzw
mov [precise(xyz)] r3.xyz, v0.xyzx
mov [precise(w)] r3.w, l(1.000000)
dp4 [precise(x)] r2.x, r3.xyzw, r2.xyzw
mov [precise(xyz)] r4.xyz, l(-0.000000,-0.000000,-0.000000,0)
mov [precise(w)] r4.w, -cb12[40].z
iadd [precise] r5.xyzw, r0.xxyy, l(1, 2, 1, 2)
add [precise] r6.xyzw, r4.zzzw, cb10[r5.y + 0].xyzw
mul [precise] r6.xyzw, r6.xyzw, v4.xxxx
add [precise] r7.xyzw, r4.zzzw, cb10[r5.w + 0].xyzw
mul [precise] r7.xyzw, r7.xyzw, v4.yyyy
add [precise] r6.xyzw, r6.xyzw, r7.xyzw
iadd [precise] r7.xyzw, r0.zzww, l(1, 2, 1, 2)
add [precise] r8.xyzw, r4.zzzw, cb10[r7.y + 0].xyzw
add [precise] r4.xyzw, r4.xyzw, cb10[r7.w + 0].xyzw
mul [precise] r4.xyzw, r4.xyzw, v4.wwww
mul [precise] r8.xyzw, r8.xyzw, v4.zzzz
add [precise] r6.xyzw, r6.xyzw, r8.xyzw
add [precise] r4.xyzw, r4.xyzw, r6.xyzw
dp4 [precise(z)] r2.z, r3.xyzw, r4.xyzw
mov [precise(w)] r2.w, l(1.000000)
add [precise] r4.xyzw, r1.zzzw, cb10[r5.x + 0].xyzw
mul [precise] r4.xyzw, r4.xyzw, v4.xxxx
add [precise] r6.xyzw, r1.zzzw, cb10[r5.z + 0].xyzw
mul [precise] r6.xyzw, r6.xyzw, v4.yyyy
add [precise] r4.xyzw, r4.xyzw, r6.xyzw
add [precise] r6.xyzw, r1.zzzw, cb10[r7.x + 0].xyzw
add [precise] r1.xyzw, r1.zzzw, cb10[r7.z + 0].xyzw
mul [precise] r1.xyzw, r1.xyzw, v4.wwww
mul [precise] r6.xyzw, r6.xyzw, v4.zzzz
add [precise] r4.xyzw, r4.xyzw, r6.xyzw
add [precise] r1.xyzw, r1.xyzw, r4.xyzw
dp4 [precise(y)] r2.y, r3.xyzw, r1.xyzw
dp4 [precise(x)] r1.x, cb12[8].xyzw, r2.xyzw
dp4 [precise(y)] r1.y, cb12[9].xyzw, r2.xyzw
dp4 [precise(z)] r1.z, cb12[11].xyzw, r2.xyzw
mov [precise] o0.xyzw, r1.xyzz
dp3 r1.x, r1.xyzx, r1.xyzx
sqrt r1.x, r1.x
mad_sat r1.x, r1.x, cb0[0].y, -cb0[0].x
log r1.x, r1.x
mul r1.x, r1.x, cb0[0].z
exp r1.x, r1.x
min r1.x, r1.x, cb0[0].w
mul r1.yzw, v4.yyyy, cb10[r0.y + 0].xxyz
mad r1.yzw, v4.xxxx, cb10[r0.x + 0].xxyz, r1.yyzw
mad r0.xyz, v4.zzzz, cb10[r0.z + 0].xyzx, r1.yzwy
mad r0.xyz, v4.wwww, cb10[r0.w + 0].xyzx, r0.xyzx
mad r1.yzw, v2.xxyz, l(0.000000, 2.000000, 2.000000, 2.000000), l(0.000000, -1.000000, -1.000000, -1.000000)
dp3 r0.x, r1.yzwy, r0.xyzx
mul r3.xyz, v4.yyyy, cb10[r5.z + 0].xyzx
mad r3.xyz, v4.xxxx, cb10[r5.x + 0].xyzx, r3.xyzx
mad r3.xyz, v4.zzzz, cb10[r7.x + 0].xyzx, r3.xyzx
mad r3.xyz, v4.wwww, cb10[r7.z + 0].xyzx, r3.xyzx
dp3 r0.y, r1.yzwy, r3.xyzx
mul r3.xyz, v4.yyyy, cb10[r5.w + 0].xyzx
mad r3.xyz, v4.xxxx, cb10[r5.y + 0].xyzx, r3.xyzx
mad r3.xyz, v4.zzzz, cb10[r7.y + 0].xyzx, r3.xyzx
mad r3.xyz, v4.wwww, cb10[r7.w + 0].xyzx, r3.xyzx
dp3 r0.z, r1.yzwy, r3.xyzx
dp3 r0.w, r0.xyzx, r0.xyzx
rsq r0.w, r0.w
mul r0.xyz, r0.wwww, r0.xyzx
dp3 r0.w, -r2.xyzx, -r2.xyzx
rsq r0.w, r0.w
mul r1.yzw, r0.wwww, -r2.xxyz
dp3 r0.x, r0.xyzx, r1.yzwy
add r0.x, |r0.x|, -cb1[2].x
add r0.yz, -cb1[2].xxzx, cb1[2].yywy
div_sat r0.x, r0.x, r0.y
mul r0.y, r0.x, r0.x
mad r0.x, -r0.x, l(2.000000), l(3.000000)
mul r0.x, r0.x, r0.y
mad o1.z, r0.x, r0.z, cb1[2].z
mad o1.xy, v1.xyxx, cb1[0].zwzz, cb1[0].xyxx
mov o1.w, l(0)
mov o2.xyzw, v3.xyzw
add r0.xyz, -cb0[1].xyzx, cb0[2].xyzx
mad o3.xyz, r1.xxxx, r0.xyzx, cb0[1].xyzx
mov o3.w, r1.x
mov o4.x, cb0[1].w
ret 
// Approximately 0 instruction slots used

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