//Black bars.
// ---- Created with 3Dmigoto v1.3.6 on Fri Mar 16 21:49:05 2018

cbuffer PS_CONSTANT_BUFFER : register(b0)
{
  float4 vMaterialDiffuse : packoffset(c0);
  int iBlendMode : packoffset(c1);
  int alpha_test : packoffset(c1.y);
  int alpha_test_func : packoffset(c1.z);
  float alpha_ref : packoffset(c1.w);
}



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


void main(
  float4 v0 : SV_POSITION0,
  float3 v1 : TEXCOORD1,
  float4 v2 : COLOR0,
  float4 v3 : TEXCOORD0,
  float4 v4 : TEXCOORD2,
  float4 v5 : TEXCOORD3,
  out float4 o0 : SV_Target0)
{
  float4 r0,r1,r2,r3;
  uint4 bitmask, uiDest;
  float4 fDest;

  float4 iniparams = IniParams.Load(0);
  if (iniparams.z==1)
  {
	discard;
  }
  
  r0.xyz = saturate(vMaterialDiffuse.xyz);
  r0.w = 1;
  r0.xyzw = v2.xyzw * r0.xyzw;
  if (alpha_test != 0) {
    r1.x = cmp(alpha_test_func == 1);
    if (r1.x != 0) {
      r1.x = -1;
    } else {
      r1.y = cmp(alpha_test_func == 2);
      if (r1.y != 0) {
        r1.y = cmp(r0.w < alpha_ref);
        r1.x = r1.y ? 1 : -1;
      } else {
        r1.y = cmp(alpha_test_func == 3);
        if (r1.y != 0) {
          r1.y = cmp(r0.w == alpha_ref);
          r1.x = r1.y ? 1 : -1;
        } else {
          r1.y = cmp(alpha_ref >= r0.w);
          r1.z = cmp(alpha_ref < r0.w);
          r1.w = cmp(r0.w != alpha_ref);
          r1.yzw = r1.yzw ? float3(1.40129846e-045,1.40129846e-045,1.40129846e-045) : float3(-1,-1,-1);
          r2.xyzw = cmp(alpha_test_func == int4(4,5,6,7));
          r3.x = cmp(r0.w >= alpha_ref);
          r3.x = r3.x ? 1 : -1;
          r2.w = r2.w ? r3.x : 1;
          r1.w = r2.z ? r1.w : r2.w;
          r1.z = r2.y ? r1.z : r1.w;
          r1.x = r2.x ? r1.y : r1.z;
        }
      }
    }
    r1.x = (int)r1.x;
    r1.x = cmp(r1.x < 0);
    if (r1.x != 0) discard;
  }
  o0.xyzw = float4(2,2,2,1) * r0.xyzw;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384
//
//   using 3Dmigoto v1.3.6 on Fri Mar 16 21:49:05 2018
//
//
// Buffer Definitions:
//
// cbuffer PS_CONSTANT_BUFFER
// {
//
//   float4 vMaterialDiffuse;           // Offset:    0 Size:    16
//   int iBlendMode;                    // Offset:   16 Size:     4 [unused]
//   int alpha_test;                    // Offset:   20 Size:     4
//   int alpha_test_func;               // Offset:   24 Size:     4
//   float alpha_ref;                   // Offset:   28 Size:     4
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// PS_CONSTANT_BUFFER                cbuffer      NA          NA    0        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   float
// TEXCOORD                 1   xyz         1     NONE   float
// COLOR                    0   xyzw        2     NONE   float   xyzw
// TEXCOORD                 0   xy          3     NONE   float
// TEXCOORD                 2   xyz         4     NONE   float
// TEXCOORD                 3   xyzw        5     NONE   float
//
//
// 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[2], immediateIndexed
dcl_input_ps linear v2.xyzw
dcl_output o0.xyzw
dcl_temps 4
mov_sat r0.xyz, cb0[0].xyzx
mov r0.w, l(1.000000)
mul r0.xyzw, r0.xyzw, v2.xyzw
if_nz cb0[1].y
  ieq r1.x, cb0[1].z, l(1)
  if_nz r1.x
    mov r1.x, l(-1)
  else
    ieq r1.y, cb0[1].z, l(2)
    if_nz r1.y
      lt r1.y, r0.w, cb0[1].w
      movc r1.x, r1.y, l(1), l(-1)
    else
      ieq r1.y, cb0[1].z, l(3)
      if_nz r1.y
        eq r1.y, r0.w, cb0[1].w
        movc r1.x, r1.y, l(1), l(-1)
      else
        ge r1.y, cb0[1].w, r0.w
        lt r1.z, cb0[1].w, r0.w
        ne r1.w, r0.w, cb0[1].w
        movc r1.yzw, r1.yyzw, l(0,1,1,1), l(0,-1,-1,-1)
        ieq r2.xyzw, cb0[1].zzzz, l(4, 5, 6, 7)
        ge r3.x, r0.w, cb0[1].w
        movc r3.x, r3.x, l(1), l(-1)
        movc r2.w, r2.w, r3.x, l(1)
        movc r1.w, r2.z, r1.w, r2.w
        movc r1.z, r2.y, r1.z, r1.w
        movc r1.x, r2.x, r1.y, r1.z
      endif
    endif
  endif
  itof r1.x, r1.x
  lt r1.x, r1.x, l(0.000000)
  discard_nz r1.x
endif
mul o0.xyzw, r0.xyzw, l(2.000000, 2.000000, 2.000000, 1.000000)
ret
// Approximately 38 instruction slots used

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