//Lens Flare : Disable if w is 0
cbuffer cbDefaultVSC : register(b1)
{
  float4x4 ProjMatrix : packoffset(c0);
  float4x4 TextureTransform : packoffset(c4);
  float4x4 InvViewProj : packoffset(c8);
  float4x4 PrevViewProj : packoffset(c12);
  float4x4 PrevSecViewProj : packoffset(c16);
  float4 TextureScaleBias : packoffset(c20);
  float4 RenderTargetSizeVS : packoffset(c21);
  float4 RenderTargetResolutionVS : packoffset(c22);
  float4 MorphTargetParams : packoffset(c23);
  float4 OnePixelStepForS0VS : packoffset(c24);
  float4 ScreenRes[2] : packoffset(c25);
  float4 ClearSurfaceColor : packoffset(c27);
  float4 ClearSurfaceDepth : packoffset(c28);
  float4 VertexDepthClamp : packoffset(c29);
  float4 FlareScreenAspect : packoffset(c30);
  float4 DecalParams : packoffset(c31);
  float4 UserClipPlane0 : packoffset(c32);
  float4 UserClipPlane1 : packoffset(c33);
  float4 UserClipPlane2 : packoffset(c34);
  float4 UserClipPlane3 : packoffset(c35);
  float4 DecalScaleParams : packoffset(c36);
  float4 MipLevel : packoffset(c37);
}

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

void main(
  float2 v0 : POSITION0,
  float2 v1 : TEXCOORD0,
  float4 v2 : TEXCOORD1,
  out float4 o0 : TEXCOORD0,
  out float4 o1 : TEXCOORD1,
  out float4 o2 : SV_Position0)
{
  float4 r0;
  uint4 bitmask;
  r0.z = FlareScreenAspect.x * v0.x;
  r0.w = v0.y;
  o0.zw = float2(5.000000e-001,5.000000e-001) * r0.zw;
  o0.xy = v1.xy * float2(1.000000e+000,-1.000000e+000) + float2(0.000000e+000,1.000000e+000);
  o1.xyzw = v2.xyzw;
  o2.xy = v0.xy;
  o2.zw = float2(0.000000e+000,1.000000e+000);
  
// Disable lens-flare if specified
float4 iniParams = IniParams.Load(0);
if (iniParams.w == 0)
{
  o2=0;
} 
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
//
//
// Buffer Definitions: 
//
// cbuffer cbDefaultVSC
// {
//
//   float4x4 ProjMatrix;               // Offset:    0 Size:    64 [unused]
//   float4x4 TextureTransform;         // Offset:   64 Size:    64 [unused]
//   float4x4 InvViewProj;              // Offset:  128 Size:    64 [unused]
//   float4x4 PrevViewProj;             // Offset:  192 Size:    64 [unused]
//   float4x4 PrevSecViewProj;          // Offset:  256 Size:    64 [unused]
//   float4 TextureScaleBias;           // Offset:  320 Size:    16 [unused]
//   float4 RenderTargetSizeVS;         // Offset:  336 Size:    16 [unused]
//   float4 RenderTargetResolutionVS;   // Offset:  352 Size:    16 [unused]
//   float4 MorphTargetParams;          // Offset:  368 Size:    16 [unused]
//   float4 OnePixelStepForS0VS;        // Offset:  384 Size:    16 [unused]
//   float4 ScreenRes[2];               // Offset:  400 Size:    32 [unused]
//   float4 ClearSurfaceColor;          // Offset:  432 Size:    16 [unused]
//   float4 ClearSurfaceDepth;          // Offset:  448 Size:    16 [unused]
//   float4 VertexDepthClamp;           // Offset:  464 Size:    16 [unused]
//   float4 FlareScreenAspect;          // Offset:  480 Size:    16
//   float4 DecalParams;                // Offset:  496 Size:    16 [unused]
//   float4 UserClipPlane0;             // Offset:  512 Size:    16 [unused]
//   float4 UserClipPlane1;             // Offset:  528 Size:    16 [unused]
//   float4 UserClipPlane2;             // Offset:  544 Size:    16 [unused]
//   float4 UserClipPlane3;             // Offset:  560 Size:    16 [unused]
//   float4 DecalScaleParams;           // Offset:  576 Size:    16 [unused]
//   float4 MipLevel;                   // Offset:  592 Size:    16 [unused]
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// cbDefaultVSC                      cbuffer      NA          NA    1        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION                 0   xy          0     NONE   float   xy  
// TEXCOORD                 0   xy          1     NONE   float   xy  
// TEXCOORD                 1   xyzw        2     NONE   float   xyzw
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// TEXCOORD                 0   xyzw        0     NONE   float   xyzw
// TEXCOORD                 1   xyzw        1     NONE   float   xyzw
// SV_Position              0   xyzw        2      POS   float   xyzw
//
vs_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb1[31], immediateIndexed
dcl_input v0.xy
dcl_input v1.xy
dcl_input v2.xyzw
dcl_output o0.xyzw
dcl_output o1.xyzw
dcl_output_siv o2.xyzw, position
dcl_temps 1
mul r0.z, v0.x, cb1[30].x
mov r0.w, v0.y
mul o0.zw, r0.zzzw, l(0.000000, 0.000000, 0.500000, 0.500000)
mad o0.xy, v1.xyxx, l(1.000000, -1.000000, 0.000000, 0.000000), l(0.000000, 1.000000, 0.000000, 0.000000)
mov o1.xyzw, v2.xyzw
mov o2.xy, v0.xyxx
mov o2.zw, l(0,0,0,1.000000)
ret 
// Approximately 8 instruction slots used
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
