// ---- Created with 3Dmigoto v1.2.67 on Sat Jan 06 01:38:10 2018
Texture2D<float4> t0 : register(t0);

SamplerState s0_s : register(s0);

cbuffer cb2 : register(b2)
{
  float4 cb2[4];
}

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

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




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


void main(
  float4 v0 : POSITION0,
  float3 v1 : NORMAL0,
  float4 v2 : TEXCOORD0,
  out float4 o0 : COLOR0,
  out float4 o1 : SV_POSITION0,
  out float2 o2 : TEXCOORD0,
  out float2 p2 : TEXCOORD1)
{
  float4 r0,r1,r2,r9,r10,r11;
  uint4 bitmask, uiDest;
  float4 fDest;

  r0.xy = cb1[6].xy * -cb0[5].zw;
  r0.xy = r0.xy / cb0[7].xy;
  r0.z = trunc(cb0[7].z);
  r0.w = cb1[6].y / cb1[6].x;
  r1.xyzw = cb2[1].xyzw * v0.yyyy;
  r1.xyzw = cb2[0].xyzw * v0.xxxx + r1.xyzw;
  r1.xyzw = cb2[2].xyzw * v0.zzzz + r1.xyzw;
  r1.xyzw = cb2[3].xyzw * v0.wwww + r1.xyzw;
  r2.xyz = float3(0.5,0.5,0.5) * r1.xyw;
  r2.w = cb1[5].x * r2.y;
  r2.yz = r2.xw + r2.zz;
  r2.x = r2.y / r0.w;
  r2.xy = r2.xz / r1.ww;
  r0.w = 1 / cb1[6].y;
  r2.y = -r0.w * 2 + r2.y;
  r0.w = cb0[6].w * r0.w;
  r2.z = -r0.w * r0.z + r2.y;
  r0.z = cb1[6].y / cb0[7].y;
  r0.zw = r2.xz * r0.zz;
  r0.xyzw = r0.xyzw / cb0[6].zwzw;
  r0.xy = r0.zw + r0.xy;
  r0.xyzw = t0.SampleLevel(s0_s, r0.xy, 0).xyzw;
  r0.xyz = r0.xyz / r1.www;
  r0.w = cb0[8].x + -cb0[7].w;
  o0.w = r0.z * r0.w + cb0[7].w;
  r0.y = -0.25 + r0.y;
  r0.xy = cb0[6].xy * r0.xy;
  r0.xy = trunc(r0.xy);
  r0.zw = float2(2,2) / cb1[6].xy;
  r1.y = r0.y * r0.w + r1.y;
  r1.x = r0.x * r0.z + r1.x;
  r10.xyzw = r1.xyzw;

r9 = r10;

float4 stereo = StereoParams.Load(0);
float4 iniParams = IniParams.Load(0);

if(r9.w == 1){
r11.x = 1 + abs(iniParams.x * 0.117);
if(r9.x < -0.997){r10.x = r10.x * r11.x;}
if(r9.x > 0.997){r10.x = r10.x * r11.x;}

r10.x += stereo.x * iniParams.x;
}

o1 = r10;
  r0.xyz = float3(0.5,0.5,0.5) * r1.xyw;
  r0.w = cb1[5].x * r0.y;
  p2.xy = r0.xw + r0.zz;
  o2.xy = v2.xy * cb0[3].xy + cb0[3].zw;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v1.2.67 on Sat Jan 06 01:38:10 2018
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION                 0   xyzw        0     NONE   float   xyzw
// NORMAL                   0   xyz         1     NONE   float       
// TEXCOORD                 0   xyzw        2     NONE   float   xy  
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// COLOR                    0   xyzw        0     NONE   float      w
// SV_POSITION              0   xyzw        1      POS   float   xyzw
// TEXCOORD                 0   xy          2     NONE   float   xy  
// TEXCOORD                 1     zw        2     NONE   float     zw
//
vs_4_0
dcl_constantbuffer cb0[9], immediateIndexed
dcl_constantbuffer cb1[7], immediateIndexed
dcl_constantbuffer cb2[4], immediateIndexed
dcl_sampler s0, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_input v0.xyzw
dcl_input v2.xy
dcl_output o0.w
dcl_output_siv o1.xyzw, position
dcl_output o2.xy
dcl_output o2.zw
dcl_temps 3
mul r0.xy, -cb0[5].zwzz, cb1[6].xyxx
div r0.xy, r0.xyxx, cb0[7].xyxx
round_z r0.z, cb0[7].z
div r0.w, cb1[6].y, cb1[6].x
mul r1.xyzw, v0.yyyy, cb2[1].xyzw
mad r1.xyzw, cb2[0].xyzw, v0.xxxx, r1.xyzw
mad r1.xyzw, cb2[2].xyzw, v0.zzzz, r1.xyzw
mad r1.xyzw, cb2[3].xyzw, v0.wwww, r1.xyzw
mul r2.xyz, r1.xywx, l(0.500000, 0.500000, 0.500000, 0.000000)
mul r2.w, r2.y, cb1[5].x
add r2.yz, r2.zzzz, r2.xxwx
div r2.x, r2.y, r0.w
div r2.xy, r2.xzxx, r1.wwww
div r0.w, l(1.000000, 1.000000, 1.000000, 1.000000), cb1[6].y
mad r2.y, -r0.w, l(2.000000), r2.y
mul r0.w, r0.w, cb0[6].w
mad r2.z, -r0.w, r0.z, r2.y
div r0.z, cb1[6].y, cb0[7].y
mul r0.zw, r0.zzzz, r2.xxxz
div r0.xyzw, r0.xyzw, cb0[6].zwzw
add r0.xy, r0.xyxx, r0.zwzz
sample_l r0.xyzw, r0.xyxx, t0.xyzw, s0, l(0.000000)
div r0.xyz, r0.xyzx, r1.wwww
add r0.w, -cb0[7].w, cb0[8].x
mad o0.w, r0.z, r0.w, cb0[7].w
add r0.y, r0.y, l(-0.250000)
mul r0.xy, r0.xyxx, cb0[6].xyxx
round_z r0.xy, r0.xyxx
div r0.zw, l(0.000000, 0.000000, 2.000000, 2.000000), cb1[6].xxxy
mad r1.y, r0.y, r0.w, r1.y
mad r1.x, r0.x, r0.z, r1.x
mov o1.xyzw, r1.xyzw
mul r0.xyz, r1.xywx, l(0.500000, 0.500000, 0.500000, 0.000000)
mul r0.w, r0.y, cb1[5].x
add o2.zw, r0.zzzz, r0.xxxw
mad o2.xy, v2.xyxx, cb0[3].xyxx, cb0[3].zwzz
ret 
// Approximately 0 instruction slots used

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