// map pins, various ui
// Generated by Microsoft (R) HLSL Shader Compiler 10.0.10011.16384
//
//   using 3Dmigoto v1.3.16 on Sat Aug 15 16:01:26 2020
//
//
// Buffer Definitions:
//
// cbuffer MenuShaderDynamic
// {
//
//   row_major float4x4 g_LocalRootTransform;// Offset:    0 Size:    64
//   float4 vParentClip;                // Offset:   64 Size:    16 [unused]
//   float4 g_HighlightColor;           // Offset:   80 Size:    16 [unused]
//   float4 g_HighlightRange;           // Offset:   96 Size:    16 [unused]
//   float4 g_mTexMatrix;               // Offset:  112 Size:    16
//   float4 g_mPosMatrix;               // Offset:  128 Size:    16
//   float4 vColor0;                    // Offset:  144 Size:    16 [unused]
//   float4 vColor1;                    // Offset:  160 Size:    16 [unused]
//   float2 vOffset;                    // Offset:  176 Size:     8
//   uint nShaderFlags;                 // Offset:  184 Size:     4
//   bool bRenderMask;                  // Offset:  188 Size:     4 [unused]
//   uint4 BaseCompressionInfo;         // Offset:  192 Size:    16 [unused]
//   uint4 BaseTextureInfo;             // Offset:  208 Size:    16 [unused]
//   float4 vBaseScaleOffset;           // Offset:  224 Size:    16 [unused]
//   uint4 MaskCompressionInfo;         // Offset:  240 Size:    16 [unused]
//   uint4 MaskTextureInfo;             // Offset:  256 Size:    16 [unused]
//   float4 vMaskSizePos;               // Offset:  272 Size:    16
//   float4 vMaskScaleOffset;           // Offset:  288 Size:    16
//   uint4 RenderMaskCompressionInfo;   // Offset:  304 Size:    16 [unused]
//   uint4 RenderMaskTextureInfo;       // Offset:  320 Size:    16 [unused]
//   float4 vRenderMaskSizePos;         // Offset:  336 Size:    16 [unused]
//   float4 aVertexData[18];            // Offset:  352 Size:   288
//
// }
//
// cbuffer ForgeUIGlobals
// {
//
//   row_major float4x4 g_ViewProj;     // Offset:    0 Size:    64
//   bool g_bLinearOutput;              // Offset:   64 Size:     4 [unused]
//
// }
//
// Resource bind info for GlyphDataBuffer
// {
//
//   struct GlyphData
//   {
//
//       float2 vPosition;              // Offset:    0
//       float2 vUVOffset;              // Offset:    8
//       float2 vUVScale;               // Offset:   16
//       float fGlyphSize;              // Offset:   24
//       float fGradientRange;          // Offset:   28
//
//   } $Element;                        // Offset:    0 Size:    32
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// GlyphDataBuffer                   texture  struct         r/o    6        1
// MenuShaderDynamic                 cbuffer      NA          NA    0        1
// ForgeUIGlobals                    cbuffer      NA          NA    1        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_VERTEXID              0   x           0   VERTID    uint   x
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   float   xyzw
// TEXCOORD                 0   xy          1     NONE   float   xy
// TEXCOORD                 1     zw        1     NONE   float     zw
// TEXCOORD                 2   x           2     NONE   float   x
//
vs_5_0
dcl_globalFlags refactoringAllowed
dcl_immediateConstantBuffer { { 1.000000, 1.000000, 0, 0},
                              { 0, 1.000000, 0, 0},
                              { 1.000000, 0, 0, 0},
                              { 0, 0, 0, 0} }
dcl_constantbuffer cb0[40], dynamicIndexed
dcl_constantbuffer cb1[4], immediateIndexed
dcl_resource_structured t6, 32
dcl_input_sgv v0.x, vertex_id
dcl_output_siv o0.xyzw, position
dcl_output o1.xy
dcl_output o1.zw
dcl_output o2.x

dcl_resource_texture2d (float,float,float,float) t125
dcl_resource_texture1d (float,float,float,float) t120
dcl_temps 11

and r0.x, l(1024), cb0[11].z
if_nz r0.x
  ushr r0.x, v0.x, l(2)
  ld_structured_indexable(structured_buffer, stride=32)(mixed,mixed,mixed,mixed) r1.xyzw, r0.x, l(0), t6.xyzw
  ld_structured_indexable(structured_buffer, stride=32)(mixed,mixed,mixed,mixed) r0.xyzw, r0.x, l(16), t6.xyzw
  round_pi r2.y, r0.z
  and r2.z, v0.x, l(3)
  mov r2.x, r0.z
  mad r1.xy, icb[r2.z + 0].xyxx, r2.xyxx, r1.xyxx
  mul r0.z, r0.y, icb[r2.z + 0].y
  mad r2.xy, icb[r2.z + 0].xyxx, r0.xyxx, r1.zwzz
  mul r0.x, r0.w, r0.y
  div o2.x, r0.z, r0.x
  mov o1.zw, r2.xxxy
else
  ushr r0.x, v0.x, l(2)
  ishl r0.y, r0.x, l(1)
  imad r0.x, r0.x, l(2), l(1)
  and r0.z, v0.x, l(3)
  mad r1.xy, icb[r0.z + 0].xyxx, cb0[r0.y + 22].xyxx, cb0[r0.y + 22].zwzz
  mad r0.yz, icb[r0.z + 0].xxyx, cb0[r0.x + 22].xxyx, cb0[r0.x + 22].zzwz
  and r3.xyz, l(8, 16, 512, 0), cb0[11].zzzz
  mov_sat r1.zw, r0.yyyz
  movc r2.xy, r3.xyxx, r0.yzyy, r1.zwzz
  if_nz r3.z
    and r0.y, v0.x, l(3)
    mad r0.xy, icb[r0.y + 0].xyxx, cb0[r0.x + 22].xyxx, cb0[r0.x + 22].zwzz
    add r0.xy, r0.xyxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
    dp2 r0.z, r0.xyxx, cb0[18].xyxx
    dp2 r0.w, r0.xyxx, cb0[18].zwzz
    add o1.zw, r0.zzzw, l(0.000000, 0.000000, 0.500000, 0.500000)
  else
    and r0.x, v0.x, l(3)
    mad o1.zw, icb[r0.x + 0].xxxy, cb0[17].xxxy, cb0[17].zzzw
  endif
  mov o2.x, l(0)
endif
dp2 r0.x, r1.xyxx, cb0[8].xyxx
dp2 r0.y, r1.xyxx, cb0[8].zwzz
add r0.zw, r2.xxxy, l(0.000000, 0.000000, -0.500000, -0.500000)
dp2 r1.x, r0.zwzz, cb0[7].xyxx
dp2 r1.y, r0.zwzz, cb0[7].zwzz
add o1.xy, r1.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
add r0.xy, r0.xyxx, cb0[11].xyxx
mul r1.xyzw, r0.yyyy, cb0[1].xyzw
mad r0.xyzw, r0.xxxx, cb0[0].xyzw, r1.xyzw
add r0.xyzw, r0.xyzw, cb0[3].xyzw
mul r1.xyzw, r0.yyyy, cb1[1].xyzw
mad r1.xyzw, r0.xxxx, cb1[0].xyzw, r1.xyzw
mad r1.xyzw, r0.zzzz, cb1[2].xyzw, r1.xyzw
mad r6.xyzw, r0.wwww, cb1[3].xyzw, r1.xyzw


ld_indexable(texture2d)(float,float,float,float) r7.xyzw, l(0, 0, 0, 0), t125.xyzw
ld_indexable(texture1d)(float,float,float,float) r8.xyzw, l(0, 0, 0, 0), t120.xyzw
ld_indexable(texture1d)(float,float,float,float) r9.xyzw, l(3, 0, 0, 0), t120.xyzw
ld_indexable(texture1d)(float,float,float,float) r10.xyzw, l(2, 0, 0, 0), t120.xyzw

add r5.w, r6.w, r8.y
if_nz r5.w
add r7.y, r6.w, -r7.y
mad r6.x, r7.x, r7.y, r6.x

else

mul r5.x, r10.y, r9.x
add r5.x, |r8.y|, |r5.x|

add r4.x, r6.x, r9.y
add r4.x, r4.x, |r4.x|
if_nz r4.x
mul r6.x, r6.x, r5.x
endif

add r4.x, r6.x, |r9.y|
add r4.x, r4.x, |r4.x|
if_z r4.x
mul r6.x, r6.x, r5.x
endif


mad r6.x, r7.x, r10.y, r6.x
endif

mov o0.xyzw, r6.xyzw

ret
// Approximately 52 instruction slots used

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