//Cel shading 2.
// ---- Created with 3Dmigoto v1.2.64 on Sat Sep 09 17:17:15 2017

cbuffer _Globals : register(b0)
{
  float4 _g_edge_color : packoffset(c0);
}

SamplerState samp04_samplerstate_s : register(s0);
Texture2D<float4> samp04 : 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,
  out float4 o0 : SV_Target0)
{
  float4 r0;
  uint4 bitmask, uiDest;
  float4 fDest;

  float4 iniparams = IniParams.Load(int2(1,0));
  if (iniparams.x==1)
  {
	discard;
  }
  
  r0.x = samp04.Sample(samp04_samplerstate_s, v1.xy).y;
  r0.y = cmp(0 >= r0.x);
  o0.w = r0.x;
  if (r0.y != 0) discard;
  o0.xyz = _g_edge_color.xyz;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.16384
//
//   using 3Dmigoto v1.2.64 on Sat Sep 09 17:17:15 2017
//
//
// Buffer Definitions: 
//
// cbuffer $Globals
// {
//
//   float4 _g_edge_color;              // Offset:    0 Size:    16
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// samp04_samplerstate               sampler      NA          NA    0        1
// samp04                            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       
// 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_sampler s0, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_input_ps linear v1.xy
dcl_output o0.xyzw
dcl_temps 1
sample_indexable(texture2d)(float,float,float,float) r0.x, v1.xyxx, t0.yxzw, s0
ge r0.y, l(0.000000), r0.x
mov o0.w, r0.x
discard_nz r0.y
mov o0.xyz, cb0[0].xyzx
ret 
// Approximately 6 instruction slots used

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