//red city ranged attack arrow
// ---- Created with 3Dmigoto v1.3.16 on Mon Aug 17 02:05:18 2020

cbuffer WorldView_RangedArrowOverlayDynamic : register(b0)
{
  row_major float4x4 f4WorldMatrix : packoffset(c0);
  float4 f4TintColor : packoffset(c4);
  float fLerpFactor : packoffset(c5);
}

cbuffer WorldViewGlobals : register(b1)
{
  row_major float4x4 g_ViewProjMatrix : packoffset(c0);
  row_major float4x4 g_ViewProjSS : packoffset(c4);
  row_major float4x4 g_ViewProjSSInverseTranspose : packoffset(c8);
  row_major float4x4 g_ViewMatrix : packoffset(c12);
  row_major float4x4 g_NDCToWorld : packoffset(c16);
  row_major float4x4 g_OverlaySamplingMatrix : packoffset(c20);
  row_major float4x4 g_ShadowMapSamplingMatrix : packoffset(c24);
  row_major float4x4 g_ShadowMapSamplingMatrixInverse : packoffset(c28);
  float4 g_vDynLightingGridInfo : packoffset(c32);
  float3 g_vLightDirection : packoffset(c33);
  float g_ShadowZBias : packoffset(c33.w);
  float4 g_MainPassDimensions : packoffset(c34);
  float4 g_FinalDimensions : packoffset(c35);
  float4 g_ShadowMapDimensions : packoffset(c36);
  int g_bSSOverlay : packoffset(c37);
  int g_bShadows : packoffset(c37.y);
  int g_nPixelsPerBlock : packoffset(c37.z);
  uint g_nRTSamples : packoffset(c37.w);
  float g_fMipBias : packoffset(c38);
  float2 g_vNearFar : packoffset(c38.y);
  float g_SceneExposure : packoffset(c38.w);
  float g_InvSceneExposure : packoffset(c39);
  float g_IntermediateExposure : packoffset(c39.y);
  float g_InvIntermediateExposure : packoffset(c39.z);
  float4 g_vFogParams : packoffset(c40);
  float4 g_vFogSkyColor_IntegralDensity : packoffset(c41);
  float3 g_vFogLightColor : packoffset(c42);
  float3 g_vWorldWrapTranslation : packoffset(c43);
  float3 g_vEyePosition : packoffset(c44);
  float3 g_vLightColor : packoffset(c45);
  float4 g_EnvSHPremultipliedIrradiance[7] : packoffset(c46);
  float4 g_EnvSHRadiance[7] : packoffset(c53);
  float3 g_vSkySH : packoffset(c60);
  float g_DoTonemap : packoffset(c60.w);
  float g_LightMapWeight : packoffset(c61);
  float g_fModelTime : packoffset(c61.y);
  float2 g_vPixelMultiplier : packoffset(c61.z);
  float4 g_FOWFullFogParchmentUVTransform : packoffset(c62);
  float3 g_FOWCoastStripeColor : packoffset(c63);
  float g_FOWCoastStripeThickness : packoffset(c63.w);
  float3 g_FOWTintColor : packoffset(c64);
  float g_fFOWBorderNoiseUVScale : packoffset(c64.w);
  float3 g_vFOWBorderColor : packoffset(c65);
  float g_fFOWBorderNoiseIntensity : packoffset(c65.w);
  float3 g_FOWTerrainHatchColor : packoffset(c66);
  float g_FOWTerrainHatchTextureCount : packoffset(c66.w);
  float4 g_FOWTerrainHatchUVTransform : packoffset(c67);
  float3 g_FOWModelsHatchColor : packoffset(c68);
  float g_FOWModelsHatchTextureCount : packoffset(c68.w);
  float4 g_FOWModelsHatchUVTransform : packoffset(c69);
  float3 g_FOWModelsStrokeColor : packoffset(c70);
  float g_FOWModelsStrokeOpacity : packoffset(c70.w);
  float4 g_FOWFlowLineColor : packoffset(c71);
  float3 g_FOWFlowLinePositionBias : packoffset(c72);
  float g_FOWFlowLineThickness : packoffset(c72.w);
  float g_FOWModelsParchmentWeight : packoffset(c73);
  float g_FOWModelsStrokeThickness : packoffset(c73.y);
  float g_FOWStrokeOpacityMultiplier : packoffset(c73.z);
  row_major float4x4 g_TerrainHexToWorld : packoffset(c74);
  float g_TerrainFlatHeight : packoffset(c78);
}



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


void main(
  float3 v0 : POSITION0,
  float2 v1 : TEXCOORD0,
  out float4 o0 : SV_POSITION0,
  out float2 o1 : TEXCOORD0)
{
  float4 r0,r1;
  uint4 bitmask, uiDest;
  float4 fDest;

  r0.xyzw = f4WorldMatrix._m10_m11_m12_m13 * v0.yyyy;
  r0.xyzw = v0.xxxx * f4WorldMatrix._m00_m01_m02_m03 + r0.xyzw;
  r0.xyzw = v0.zzzz * f4WorldMatrix._m20_m21_m22_m23 + r0.xyzw;
  r0.xyzw = f4WorldMatrix._m30_m31_m32_m33 + r0.xyzw;
  r1.xyzw = g_ViewProjMatrix._m10_m11_m12_m13 * r0.yyyy;
  r1.xyzw = r0.xxxx * g_ViewProjMatrix._m00_m01_m02_m03 + r1.xyzw;
  r1.xyzw = r0.zzzz * g_ViewProjMatrix._m20_m21_m22_m23 + r1.xyzw;
  o0.xyzw = r0.wwww * g_ViewProjMatrix._m30_m31_m32_m33 + r1.xyzw;

float4 stereo = StereoParams.Load(0);
o0.x += stereo.x*(o0.w - stereo.y);

  o1.xy = v1.xy;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 10.0.10011.16384
//
//   using 3Dmigoto v1.3.16 on Mon Aug 17 02:05:18 2020
//
//
// Buffer Definitions:
//
// cbuffer WorldView_RangedArrowOverlayDynamic
// {
//
//   row_major float4x4 f4WorldMatrix;  // Offset:    0 Size:    64
//   float4 f4TintColor;                // Offset:   64 Size:    16 [unused]
//   float fLerpFactor;                 // Offset:   80 Size:     4 [unused]
//
// }
//
// cbuffer WorldViewGlobals
// {
//
//   row_major float4x4 g_ViewProjMatrix;// Offset:    0 Size:    64
//   row_major float4x4 g_ViewProjSS;   // Offset:   64 Size:    64 [unused]
//   row_major float4x4 g_ViewProjSSInverseTranspose;// Offset:  128 Size:    64 [unused]
//   row_major float4x4 g_ViewMatrix;   // Offset:  192 Size:    64 [unused]
//   row_major float4x4 g_NDCToWorld;   // Offset:  256 Size:    64 [unused]
//   row_major float4x4 g_OverlaySamplingMatrix;// Offset:  320 Size:    64 [unused]
//   row_major float4x4 g_ShadowMapSamplingMatrix;// Offset:  384 Size:    64 [unused]
//   row_major float4x4 g_ShadowMapSamplingMatrixInverse;// Offset:  448 Size:    64 [unused]
//   float4 g_vDynLightingGridInfo;     // Offset:  512 Size:    16 [unused]
//   float3 g_vLightDirection;          // Offset:  528 Size:    12 [unused]
//   float g_ShadowZBias;               // Offset:  540 Size:     4 [unused]
//   float4 g_MainPassDimensions;       // Offset:  544 Size:    16 [unused]
//   float4 g_FinalDimensions;          // Offset:  560 Size:    16 [unused]
//   float4 g_ShadowMapDimensions;      // Offset:  576 Size:    16 [unused]
//   int g_bSSOverlay;                  // Offset:  592 Size:     4 [unused]
//   int g_bShadows;                    // Offset:  596 Size:     4 [unused]
//   int g_nPixelsPerBlock;             // Offset:  600 Size:     4 [unused]
//   uint g_nRTSamples;                 // Offset:  604 Size:     4 [unused]
//   float g_fMipBias;                  // Offset:  608 Size:     4 [unused]
//   float2 g_vNearFar;                 // Offset:  612 Size:     8 [unused]
//   float g_SceneExposure;             // Offset:  620 Size:     4 [unused]
//   float g_InvSceneExposure;          // Offset:  624 Size:     4 [unused]
//   float g_IntermediateExposure;      // Offset:  628 Size:     4 [unused]
//   float g_InvIntermediateExposure;   // Offset:  632 Size:     4 [unused]
//   float4 g_vFogParams;               // Offset:  640 Size:    16 [unused]
//   float4 g_vFogSkyColor_IntegralDensity;// Offset:  656 Size:    16 [unused]
//   float3 g_vFogLightColor;           // Offset:  672 Size:    12 [unused]
//   float3 g_vWorldWrapTranslation;    // Offset:  688 Size:    12 [unused]
//   float3 g_vEyePosition;             // Offset:  704 Size:    12 [unused]
//   float3 g_vLightColor;              // Offset:  720 Size:    12 [unused]
//   float4 g_EnvSHPremultipliedIrradiance[7];// Offset:  736 Size:   112 [unused]
//   float4 g_EnvSHRadiance[7];         // Offset:  848 Size:   112 [unused]
//   float3 g_vSkySH;                   // Offset:  960 Size:    12 [unused]
//   float g_DoTonemap;                 // Offset:  972 Size:     4 [unused]
//   float g_LightMapWeight;            // Offset:  976 Size:     4 [unused]
//   float g_fModelTime;                // Offset:  980 Size:     4 [unused]
//   float2 g_vPixelMultiplier;         // Offset:  984 Size:     8 [unused]
//   float4 g_FOWFullFogParchmentUVTransform;// Offset:  992 Size:    16 [unused]
//   float3 g_FOWCoastStripeColor;      // Offset: 1008 Size:    12 [unused]
//   float g_FOWCoastStripeThickness;   // Offset: 1020 Size:     4 [unused]
//   float3 g_FOWTintColor;             // Offset: 1024 Size:    12 [unused]
//   float g_fFOWBorderNoiseUVScale;    // Offset: 1036 Size:     4 [unused]
//   float3 g_vFOWBorderColor;          // Offset: 1040 Size:    12 [unused]
//   float g_fFOWBorderNoiseIntensity;  // Offset: 1052 Size:     4 [unused]
//   float3 g_FOWTerrainHatchColor;     // Offset: 1056 Size:    12 [unused]
//   float g_FOWTerrainHatchTextureCount;// Offset: 1068 Size:     4 [unused]
//   float4 g_FOWTerrainHatchUVTransform;// Offset: 1072 Size:    16 [unused]
//   float3 g_FOWModelsHatchColor;      // Offset: 1088 Size:    12 [unused]
//   float g_FOWModelsHatchTextureCount;// Offset: 1100 Size:     4 [unused]
//   float4 g_FOWModelsHatchUVTransform;// Offset: 1104 Size:    16 [unused]
//   float3 g_FOWModelsStrokeColor;     // Offset: 1120 Size:    12 [unused]
//   float g_FOWModelsStrokeOpacity;    // Offset: 1132 Size:     4 [unused]
//   float4 g_FOWFlowLineColor;         // Offset: 1136 Size:    16 [unused]
//   float3 g_FOWFlowLinePositionBias;  // Offset: 1152 Size:    12 [unused]
//   float g_FOWFlowLineThickness;      // Offset: 1164 Size:     4 [unused]
//   float g_FOWModelsParchmentWeight;  // Offset: 1168 Size:     4 [unused]
//   float g_FOWModelsStrokeThickness;  // Offset: 1172 Size:     4 [unused]
//   float g_FOWStrokeOpacityMultiplier;// Offset: 1176 Size:     4 [unused]
//   row_major float4x4 g_TerrainHexToWorld;// Offset: 1184 Size:    64 [unused]
//   float g_TerrainFlatHeight;         // Offset: 1248 Size:     4 [unused]
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// WorldView_RangedArrowOverlayDynamic    cbuffer      NA          NA    0        1
// WorldViewGlobals                  cbuffer      NA          NA    1        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION                 0   xyz         0     NONE   float   xyz
// TEXCOORD                 0   xy          1     NONE   float   xy
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   float   xyzw
// TEXCOORD                 0   xy          1     NONE   float   xy
//
vs_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[4], immediateIndexed
dcl_constantbuffer cb1[4], immediateIndexed
dcl_input v0.xyz
dcl_input v1.xy
dcl_output_siv o0.xyzw, position
dcl_output o1.xy
dcl_temps 2
mul r0.xyzw, v0.yyyy, cb0[1].xyzw
mad r0.xyzw, v0.xxxx, cb0[0].xyzw, r0.xyzw
mad r0.xyzw, v0.zzzz, cb0[2].xyzw, r0.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 o0.xyzw, r0.wwww, cb1[3].xyzw, r1.xyzw
mov o1.xy, v1.xyxx
ret
// Approximately 10 instruction slots used

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