//Drink PS 2.
// ---- Created with 3Dmigoto v1.3.16 on Sat May 18 21:49:19 2019
cbuffer cb9 : register(b9)
{
  float4 cb9[1];
}




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


void main(
  float4 v0 : TEXCOORD0,
  float3 v1 : TEXCOORD1,
  out float4 o0 : SV_Target0)
{
  float4 r0;
  uint4 bitmask, uiDest;
  float4 fDest;
  
  float4 stereo = StereoParams.Load(0);
  
  r0.x = dot(v1.xyz, v1.xyz);
  r0.x = rsqrt(r0.x);
  
  r0.z=r0.x;
  
  r0.xy = v1.xy * r0.xx;
  
  r0.x+=stereo.x*(r0.z+stereo.y*v1.z)/cb9[0].x;
  
  o0.xy = r0.xy * float2(0.5,0.5) + float2(0.5,0.5);
  r0.xy = -cb9[0].xz + v0.zw;
  o0.zw = saturate(cb9[0].yw * r0.xy);
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v1.3.16 on Sat May 18 21:49:19 2019
//
//
// Note: shader requires additional functionality:
//       Early depth-stencil
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// TEXCOORD                 0   xyzw        0     NONE   float     zw
// TEXCOORD                 1   xyz         1     NONE   float   xyz
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target                0   xyzw        0   TARGET   float   xyzw
//
ps_5_0
dcl_globalFlags refactoringAllowed | forceEarlyDepthStencil
dcl_constantbuffer cb9[1], immediateIndexed
dcl_input_ps linear v0.zw
dcl_input_ps linear v1.xyz
dcl_output o0.xyzw
dcl_temps 1
dp3 r0.x, v1.xyzx, v1.xyzx
rsq r0.x, r0.x
mul r0.xy, r0.xxxx, v1.xyxx
mad o0.xy, r0.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000), l(0.500000, 0.500000, 0.000000, 0.000000)
add r0.xy, v0.zwzz, -cb9[0].xzxx
mul_sat o0.zw, r0.xxxy, cb9[0].yyyw
ret
// Approximately 0 instruction slots used

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