//Lensflares 
cbuffer cb2 : register(b2)
{
  float4 cb2[3];
}


Texture2D<float4> StereoParams : register(t125);
Texture1D<float4> IniParams : register(t120);

void main( 
  float4 v0 : POSITION0,
  float2 v1 : TEXCOORD0,
  out float4 o0 : SV_POSITION0,
  out float4 o1 : TEXCOORD0,
  out float3 o2 : TEXCOORD1)
{
  float4 r0;
  uint4 bitmask, uiDest;
  float4 fDest;

  r0.xy = cb2[2].xy * float2(2,2) + float2(-1,-1);
  r0.zw = cb2[1].xy * v0.xx;
  r0.xy = r0.xy * cb2[2].ww + r0.zw;
  r0.xy = v0.yy * cb2[1].zw + r0.xy;
  o0.xy = r0.xy;
  r0.x = dot(r0.xy, r0.xy);
  r0.x = sqrt(r0.x);
  o1.z = 0.100000001 * r0.x;
  o0.zw = float2(0,1);
  
  float4 stereo = StereoParams.Load(0);
  o0.x += stereo.x; 
  
  o1.xy = v1.xy;
  o1.w = 0;
  o2.xyz = cb2[2].xyz;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v1.2.7 on Fri Nov 13 18:49:51 2015
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION                 0   xyzw        0     NONE   float   xy  
// TEXCOORD                 0   xy          1     NONE   float   xy  
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   float   xyzw
// TEXCOORD                 0   xyzw        1     NONE   float   xyzw
// TEXCOORD                 1   xyz         2     NONE   float   xyz 
//
vs_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb2[3], immediateIndexed
dcl_input v0.xy
dcl_input v1.xy
dcl_output_siv o0.xyzw, position
dcl_output o1.xyzw
dcl_output o2.xyz
dcl_temps 1
mad r0.xy, cb2[2].xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
mul r0.zw, v0.xxxx, cb2[1].xxxy
mad r0.xy, r0.xyxx, cb2[2].wwww, r0.zwzz
mad r0.xy, v0.yyyy, cb2[1].zwzz, r0.xyxx
mov o0.xy, r0.xyxx
dp2 r0.x, r0.xyxx, r0.xyxx
sqrt r0.x, r0.x
mul o1.z, r0.x, l(0.100000)
mov o0.zw, l(0,0,0,1.000000)
mov o1.xy, v1.xyxx
mov o1.w, l(0)
mov o2.xyz, cb2[2].xyzx
ret 
// Approximately 0 instruction slots used

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