// HUD - Text

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

SamplerState texMap0_s : register(s0);
Texture2D<float4> texMap0 : register(t0);


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


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

  r0.x = texMap0.Sample(texMap0_s, v1.xy).w;
  r0.w = v2.w * r0.x;
  r0.xyz = v2.xyz;
  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;
  
float4 params = IniParams.Load(0);
if(params.x==1)
	discard;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.30.960.8229
//
//   using 3Dmigoto v1.3.3 on Mon Feb 19 21:24:55 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
// texMap0                           texture  float4          2d    0        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
// COLOR                    0   xyzw        2     NONE   float   xyzw
//
//
// 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_resource_texture2d (float,float,float,float) t0
dcl_input_ps linear v1.xy
dcl_input_ps linear v2.xyzw
dcl_output o0.xyzw
dcl_temps 3
sample_indexable(texture2d)(float,float,float,float) r0.x, v1.xyxx, t0.wxyz, s0
mul r0.w, r0.x, v2.w
mov r0.xyz, v2.xyzx
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 8 instruction slots used

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