// HUD - Selection
// \ key disables

cbuffer PER_BATCH : register(b0)
{
  row_major float2x4 cBitmapColorTransform : packoffset(c0);
  float cPremultiplyAlpha : packoffset(c2);
}

SamplerState texMap0_s : register(s0);
SamplerState texMap1_s : register(s1);
Texture2D<float4> texMap0 : register(t0);
Texture2D<float4> texMap1 : register(t1);


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


void main(
  float4 v0 : SV_Position0,
  float2 v1 : TEXCOORD0,
  float2 w1 : TEXCOORD1,
  float4 v2 : COLOR0,
  float4 v3 : COLOR1,
  out float4 o0 : SV_Target0)
{
  float4 r0,r1,r2;
  uint4 bitmask, uiDest;
  float4 fDest;

  r0.xyzw = texMap0.Sample(texMap0_s, v1.xy).xyzw;
  r1.xyzw = texMap1.Sample(texMap1_s, w1.xy).xyzw;
  r0.xyzw = -r1.xyzw + r0.xyzw;
  r0.xyzw = v3.zzzz * r0.xyzw + r1.xyzw;
  r0.xyzw = r0.xyzw * cBitmapColorTransform._m00_m01_m02_m03 + cBitmapColorTransform._m10_m11_m12_m13;
  r1.xyzw = r0.xyzw * r0.wwww;
  r2.x = cmp(0 != cPremultiplyAlpha);
  o0.xyzw = r2.xxxx ? r1.xyzw : r0.xyzw;
  

}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.30.960.8229
//
//   using 3Dmigoto v1.3.3 on Mon Feb 19 21:25:02 2018
//
//
// Buffer Definitions:
//
// cbuffer PER_BATCH
// {
//
//   row_major float2x4 cBitmapColorTransform;// Offset:    0 Size:    32
//   float cPremultiplyAlpha;           // Offset:   32 Size:     4
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// texMap0                           sampler      NA          NA    0        1
// texMap1                           sampler      NA          NA    1        1
// texMap0                           texture  float4          2d    0        1
// texMap1                           texture  float4          2d    1        1
// PER_BATCH                         cbuffer      NA          NA    0        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position              0   xyzw        0      POS   float
// TEXCOORD                 0   xy          1     NONE   float   xy
// TEXCOORD                 1     zw        1     NONE   float     zw
// COLOR                    0   xyzw        2     NONE   float
// COLOR                    1   xyzw        3     NONE   float     z
//
//
// 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[3], 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_input_ps linear v1.zw
dcl_input_ps linear v3.z
dcl_output o0.xyzw
dcl_temps 3
sample_indexable(texture2d)(float,float,float,float) r0.xyzw, v1.xyxx, t0.xyzw, s0
sample_indexable(texture2d)(float,float,float,float) r1.xyzw, v1.zwzz, t1.xyzw, s1
add r0.xyzw, r0.xyzw, -r1.xyzw
mad r0.xyzw, v3.zzzz, r0.xyzw, r1.xyzw
mad r0.xyzw, r0.xyzw, cb0[0].xyzw, cb0[1].xyzw
mul r1.xyzw, r0.wwww, r0.xyzw
ne r2.x, l(0.000000, 0.000000, 0.000000, 0.000000), cb0[2].x
movc o0.xyzw, r2.xxxx, r1.xyzw, r0.xyzw
ret
// Approximately 9 instruction slots used

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