//Lens flares PS.
// ---- Created with 3Dmigoto v1.3.16 on Sat May 22 19:23:13 2021
Texture2D<float4> t1 : register(t1);

Texture2D<float4> t0 : register(t0);

SamplerState s1_s : register(s1);

SamplerState s0_s : register(s0);

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

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

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




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


void main(
  float4 v0 : SV_POSITION0,
  float2 v1 : TEXCOORD0,
  out float4 o0 : SV_Target0)
{
  float4 r0,r1,r2;
  uint4 bitmask, uiDest;
  float4 fDest;

  r0.xy = v1.xy * float2(0.5,-0.5) + float2(0.5,0.5);
  r0.zw = saturate(r0.xy);
  r1.xyz = t0.Sample(s1_s, r0.xy).xyz;
  r0.x = r0.z * 0.875 + cb0[0].x;
  r2.z = r0.w * 0.875 + 0.0625;
  r0.x = 0.0625 + r0.x;
  r2.x = r0.x / cb0[0].y;
  r0.xyz = t1.SampleLevel(s0_s, r2.xz, 0).xyz;
  r0.xyz = cb1[43].yyy * r0.xyz;
  r0.xyz = r1.xyz * r0.xyz + cb2[1].xyz;
  r0.xyz = max(float3(0,0,0), r0.xyz);
  o0.xyz = cb0[0].zzz * r0.xyz;
  o0.w = 1;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v1.3.16 on Sat May 22 19:23:13 2021
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   float
// TEXCOORD                 0   xy          1     NONE   float   xy
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target                0   xyzw        0   TARGET   float   xyzw
//
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[1], immediateIndexed
dcl_constantbuffer cb1[44], immediateIndexed
dcl_constantbuffer cb2[2], immediateIndexed
dcl_sampler s0, mode_default
dcl_sampler s1, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_resource_texture2d (float,float,float,float) t1
dcl_input_ps linear v1.xy
dcl_output o0.xyzw
dcl_temps 3
mad r0.xy, v1.xyxx, l(0.500000, -0.500000, 0.000000, 0.000000), l(0.500000, 0.500000, 0.000000, 0.000000)
mov_sat r0.zw, r0.xxxy
sample_indexable(texture2d)(float,float,float,float) r1.xyz, r0.xyxx, t0.xyzw, s1
mad r0.x, r0.z, l(0.875000), cb0[0].x
mad r2.z, r0.w, l(0.875000), l(0.062500)
add r0.x, r0.x, l(0.062500)
div r2.x, r0.x, cb0[0].y
sample_l_indexable(texture2d)(float,float,float,float) r0.xyz, r2.xzxx, t1.xyzw, s0, l(0.000000)
mul r0.xyz, r0.xyzx, cb1[43].yyyy
mad r0.xyz, r1.xyzx, r0.xyzx, cb2[1].xyzx
max r0.xyz, r0.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
mul o0.xyz, r0.xyzx, cb0[0].zzzz
mov o0.w, l(1.000000)
ret
// Approximately 0 instruction slots used

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