// ---- Created with 3Dmigoto v1.2.21 on Sun Jan 03 12:42:26 2016
//yellow cross at top right windows corner
cbuffer _Globals : register(b0)
{
  float4x4 WVP : packoffset(c0);
  float guiShader : packoffset(c4);
  float stencil : packoffset(c4.y);
  float texturePresented : packoffset(c4.z);
  float textureArrayPresented : packoffset(c4.w);
  float4 fontBlurColor : packoffset(c5);
  float4 quadsBounds[100] : packoffset(c6);
  float4 quadsTexCoors[100] : packoffset(c106);
  float quadsTexIndices[100] : packoffset(c206);
  float2 position : packoffset(c305.y);
  float colorCount : packoffset(c305.w);
  float4 colors[9] : packoffset(c306);
}

SamplerState texSampler_s : register(s0);
Texture2D<float4> mapTex : register(t0);


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


void main( 
  float4 v0 : SV_POSITION0,
  float4 v1 : COLOR0,
  float3 v2 : TEXCOORD0,
  out float4 o0 : SV_TARGET0)
{
  float4 r0,r1;
  uint4 bitmask, uiDest;
  float4 fDest;
  float4 ftmp;

  r0.xyzw = mapTex.Sample(texSampler_s, v2.xy).xyzw;
  r1.x = cmp(0 < fontBlurColor.w);
  if (r1.x != 0) {
    r1.xyz = -fontBlurColor.xyz + v1.xyz;
    //o0.xyz = r0.www * r1.xyz + fontBlurColor.xyz;
	ftmp.xyz = r0.www * r1.xyz + fontBlurColor.xyz;
    r1.x = v1.w * r0.x;
    ftmp.w = saturate(1.5 * r1.x);
	//yellow cross
	if ((v0.x > 1900) && (ftmp.x >= 0.7) && (ftmp.y >= 0.7) && (ftmp.z >= 0.4)) {
		ftmp.xyzw = float4(0,0,0,0);
	}
	o0.xyzw=ftmp.xyzw;
    return;
  }
  // o0.xyzw = v1.xyzw * r0.xyzw;
  ftmp.xyzw = v1.xyzw * r0.xyzw;
  if ((v0.x > 1900) && (ftmp.x >= 0.7) && (ftmp.y >= 0.7) && (ftmp.z >= 0.4))  {
		ftmp.xyzw = float4(0,0,0,0);
	}
	o0.xyzw=ftmp.xyzw;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.20789
//
//   using 3Dmigoto v1.2.21 on Sun Jan 03 12:42:26 2016
//
//
// Buffer Definitions: 
//
// cbuffer $Globals
// {
//
//   float4x4 WVP;                      // Offset:    0 Size:    64 [unused]
//   float guiShader;                   // Offset:   64 Size:     4 [unused]
//   float stencil;                     // Offset:   68 Size:     4 [unused]
//   float texturePresented;            // Offset:   72 Size:     4 [unused]
//   float textureArrayPresented;       // Offset:   76 Size:     4 [unused]
//   float4 fontBlurColor;              // Offset:   80 Size:    16
//   float4 quadsBounds[100];           // Offset:   96 Size:  1600 [unused]
//   float4 quadsTexCoors[100];         // Offset: 1696 Size:  1600 [unused]
//   float quadsTexIndices[100];        // Offset: 3296 Size:  1588 [unused]
//   float2 position;                   // Offset: 4884 Size:     8 [unused]
//   float colorCount;                  // Offset: 4892 Size:     4 [unused]
//   float4 colors[9];                  // Offset: 4896 Size:   144 [unused]
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// texSampler                        sampler      NA          NA    0        1
// mapTex                            texture  float4          2d    0        1
// $Globals                          cbuffer      NA          NA    0        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   float       
// COLOR                    0   xyzw        1     NONE   float   xyzw
// TEXCOORD                 0   xyz         2     NONE   float   xy  
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_TARGET                0   xyzw        0   TARGET   float   xyzw
//
ps_4_0
dcl_constantbuffer cb0[6], immediateIndexed
dcl_sampler s0, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_input_ps linear v1.xyzw
dcl_input_ps linear v2.xy
dcl_output o0.xyzw
dcl_temps 2
sample r0.xyzw, v2.xyxx, t0.xyzw, s0
lt r1.x, l(0.000000), cb0[5].w
if_nz r1.x
  add r1.xyz, v1.xyzx, -cb0[5].xyzx
  mad o0.xyz, r0.wwww, r1.xyzx, cb0[5].xyzx
  mul r1.x, r0.x, v1.w
  mul_sat o0.w, r1.x, l(1.500000)
  ret 
endif 
mul o0.xyzw, r0.xyzw, v1.xyzw
ret 
// Approximately 11 instruction slots used

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