// HUD - yellow area of interest on minimap
// ---- Created with 3Dmigoto v1.2.31 on Wed Mar 02 22:53:56 2016

cbuffer CSceneFireUiPrimitiveParameterProvider : register(b0)
{
  float DistanceFieldFloatArray[18] : packoffset(c0);
  float BordersSizeFloatArray[8] : packoffset(c18);
  float4x4 Transform : packoffset(c26);
  float4x4 UVTransform : packoffset(c30);
  float4 BinkUVTransforms : packoffset(c34);
  float4 BackgroundColor : packoffset(c35);
  float4 BordersColor : packoffset(c36);
  float4 ColorAdd : packoffset(c37);
  float4 ColorAdjustment : packoffset(c38);
  float4 ColorMultiplier : packoffset(c39);
  float4 ColorTransparent : packoffset(c40);
  float2 ViewportScaleXY : packoffset(c41);
  float Desaturation : packoffset(c41.z);
  float LinePercentage : packoffset(c41.w);
  float TexRatio : packoffset(c42);
  float2 TexSize : packoffset(c42.y);
  float4 TexScaleOffsetDiffuse : packoffset(c43);
  float PrimGroupTime : packoffset(c44);
  float UVPerTile : packoffset(c44.y);
  float UVOffsetX : packoffset(c44.z);
  float UVOffsetY : packoffset(c44.w);
  float AspectRatio : packoffset(c45);
  int MapZoomLevel : packoffset(c45.y);
  float2 SecondaryUVBase : packoffset(c45.z);
  float2 SecondaryUVExtend : packoffset(c46);
  float2 SecondaryUVOffset : packoffset(c46.z);
  int SafeHouseFlagMap1 : packoffset(c47);
  int SafeHouseFlagMap2 : packoffset(c47.y);
  float2 UVBase_map : packoffset(c47.z);
  float2 UVScale_map : packoffset(c48);
  float2 UVBase_level1 : packoffset(c48.z);
  float2 UVScale_level1 : packoffset(c49);
  float2 UVBase_level2 : packoffset(c49.z);
  float2 UVScale_level2 : packoffset(c50);
  float2 UVBase_level3 : packoffset(c50.z);
  float2 UVScale_level3 : packoffset(c51);
  int CurrentLevel : packoffset(c51.z);
  int NextLevel : packoffset(c51.w);
  float LevelFade : packoffset(c52);
  float MapZoomLevelNorm : packoffset(c52.y);
}



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

#include <hud.hlsl>

void main( 
  float2 v0 : position0,
  float4 v1 : color0,
  out float4 o0 : SV_Position0,
  out float4 o1 : TEXCOORD0,
  out float2 o2 : TEXCOORD1)
{
  float4 r0,r1,r2;
  uint4 bitmask, uiDest;
  float4 fDest;

  r0.xy = v0.xy;
  r0.zw = float2(1,1);
  r1.x = dot(r0.xyww, Transform._m00_m10_m20_m30);
  r1.y = dot(r0.xyww, Transform._m01_m11_m21_m31);
  r1.xy = r1.xy * float2(2,2) + float2(-1,-1);
  r1.xy = float2(1,-1) * r1.xy;
  o0.xy = r1.xy;
  o2.xy = r1.xy;
  o0.z = dot(r0.xyww, Transform._m02_m12_m22_m32);
  o0.w = dot(r0.xyzw, Transform._m03_m13_m23_m33);
  r0.xyzw = float4(0.0549999997,0.0549999997,0.0549999997,0.0549999997) + abs(v1.zyxw);
  r0.xyzw = float4(0.947867274,0.947867274,0.947867274,0.947867274) * r0.xyzw;
  r0.xyzw = log2(r0.xyzw);
  r0.xyzw = float4(2.4000001,2.4000001,2.4000001,2.4000001) * r0.xyzw;
  r0.xyzw = exp2(r0.xyzw);
  r1.xyzw = cmp(float4(0.0404499993,0.0404499993,0.0404499993,0.0404499993) >= v1.zyxw);
  r2.xyzw = float4(0.0773993805,0.0773993805,0.0773993805,0.0773993805) * v1.zyxw;
  o1.xyzw = r1.xyzw ? r2.xyzw : r0.xyzw;

o0.x += adjust_hud(o0, false);

  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
//
//   using 3Dmigoto v1.2.31 on Wed Mar 02 22:53:56 2016
//
//
// Buffer Definitions: 
//
// cbuffer CSceneFireUiPrimitiveParameterProvider
// {
//
//   float DistanceFieldFloatArray[18]; // Offset:    0 Size:   276 [unused]
//   float BordersSizeFloatArray[8];    // Offset:  288 Size:   116 [unused]
//   float4x4 Transform;                // Offset:  416 Size:    64
//   float4x4 UVTransform;              // Offset:  480 Size:    64 [unused]
//   float4 BinkUVTransforms;           // Offset:  544 Size:    16 [unused]
//   float4 BackgroundColor;            // Offset:  560 Size:    16 [unused]
//   float4 BordersColor;               // Offset:  576 Size:    16 [unused]
//   float4 ColorAdd;                   // Offset:  592 Size:    16 [unused]
//   float4 ColorAdjustment;            // Offset:  608 Size:    16 [unused]
//   float4 ColorMultiplier;            // Offset:  624 Size:    16 [unused]
//   float4 ColorTransparent;           // Offset:  640 Size:    16 [unused]
//   float2 ViewportScaleXY;            // Offset:  656 Size:     8 [unused]
//   float Desaturation;                // Offset:  664 Size:     4 [unused]
//   float LinePercentage;              // Offset:  668 Size:     4 [unused]
//   float TexRatio;                    // Offset:  672 Size:     4 [unused]
//   float2 TexSize;                    // Offset:  676 Size:     8 [unused]
//   float4 TexScaleOffsetDiffuse;      // Offset:  688 Size:    16 [unused]
//   float PrimGroupTime;               // Offset:  704 Size:     4 [unused]
//   float UVPerTile;                   // Offset:  708 Size:     4 [unused]
//   float UVOffsetX;                   // Offset:  712 Size:     4 [unused]
//   float UVOffsetY;                   // Offset:  716 Size:     4 [unused]
//   float AspectRatio;                 // Offset:  720 Size:     4 [unused]
//   int MapZoomLevel;                  // Offset:  724 Size:     4 [unused]
//   float2 SecondaryUVBase;            // Offset:  728 Size:     8 [unused]
//   float2 SecondaryUVExtend;          // Offset:  736 Size:     8 [unused]
//   float2 SecondaryUVOffset;          // Offset:  744 Size:     8 [unused]
//   int SafeHouseFlagMap1;             // Offset:  752 Size:     4 [unused]
//   int SafeHouseFlagMap2;             // Offset:  756 Size:     4 [unused]
//   float2 UVBase_map;                 // Offset:  760 Size:     8 [unused]
//   float2 UVScale_map;                // Offset:  768 Size:     8 [unused]
//   float2 UVBase_level1;              // Offset:  776 Size:     8 [unused]
//   float2 UVScale_level1;             // Offset:  784 Size:     8 [unused]
//   float2 UVBase_level2;              // Offset:  792 Size:     8 [unused]
//   float2 UVScale_level2;             // Offset:  800 Size:     8 [unused]
//   float2 UVBase_level3;              // Offset:  808 Size:     8 [unused]
//   float2 UVScale_level3;             // Offset:  816 Size:     8 [unused]
//   int CurrentLevel;                  // Offset:  824 Size:     4 [unused]
//   int NextLevel;                     // Offset:  828 Size:     4 [unused]
//   float LevelFade;                   // Offset:  832 Size:     4 [unused]
//   float MapZoomLevelNorm;            // Offset:  836 Size:     4 [unused]
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// CSceneFireUiPrimitiveParameterProvider    cbuffer      NA          NA    0        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// position                 0   xy          0     NONE   float   xy  
// color                    0   xyzw        1     NONE   float   xyzw
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position              0   xyzw        0      POS   float   xyzw
// TEXCOORD                 0   xyzw        1     NONE   float   xyzw
// TEXCOORD                 1   xy          2     NONE   float   xy  
//
vs_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[30], immediateIndexed
dcl_input v0.xy
dcl_input v1.xyzw
dcl_output_siv o0.xyzw, position
dcl_output o1.xyzw
dcl_output o2.xy
dcl_temps 3
mov r0.xy, v0.xyxx
mov r0.zw, l(0,0,1.000000,1.000000)
dp4 r1.x, r0.xyww, cb0[26].xyzw
dp4 r1.y, r0.xyww, cb0[27].xyzw
mad r1.xy, r1.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
mul r1.xy, r1.xyxx, l(1.000000, -1.000000, 0.000000, 0.000000)
mov o0.xy, r1.xyxx
mov o2.xy, r1.xyxx
dp4 o0.z, r0.xyww, cb0[28].xyzw
dp4 o0.w, r0.xyzw, cb0[29].xyzw
add r0.xyzw, |v1.zyxw|, l(0.055000, 0.055000, 0.055000, 0.055000)
mul r0.xyzw, r0.xyzw, l(0.947867274, 0.947867274, 0.947867274, 0.947867274)
log r0.xyzw, r0.xyzw
mul r0.xyzw, r0.xyzw, l(2.400000, 2.400000, 2.400000, 2.400000)
exp r0.xyzw, r0.xyzw
ge r1.xyzw, l(0.040450, 0.040450, 0.040450, 0.040450), v1.zyxw
mul r2.xyzw, v1.zyxw, l(0.0773993805, 0.0773993805, 0.0773993805, 0.0773993805)
movc o1.xyzw, r1.xyzw, r2.xyzw, r0.xyzw
ret 
// Approximately 19 instruction slots used

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