//shadows
// Generated by Microsoft (R) HLSL Shader Compiler 10.0.10011.16384
//
//   using 3Dmigoto v1.3.16 on Sat Aug 15 15:49:17 2020
//
//
// Buffer Definitions:
//
// tbuffer SkinnedModelDynamics_Tint
// {
//
//   struct SkinnedModelDynamics_Tint__instanced_constantset_type__
//   {
//
//       float3 g_TintColor_Skinned;    // Index:    0
//       float g_AlphaFade_Skinned;     // Index:    0.w
//       float4 g_BounceColor_Skinned;  // Index:    1
//       float2 g_SnowThreshold_Skinned;// Index:    2
//       float4x3 BoneMatrices[60];     // Index:    3
//
//   } SkinnedModelDynamics_Tint[2];    // Index:    0-365            Components:  1464
//
// }
//
// cbuffer WorldViewGlobals
// {
//
//   row_major float4x4 g_ViewProjMatrix;// Index:    0 1 2 3          Components:    16
//   row_major float4x4 g_ViewProjSS;   // Index:    4 5 6 7          Components:    16 [unused]
//   row_major float4x4 g_ViewProjSSInverseTranspose;// Index:    8 9 10 11        Components:    16 [unused]
//   row_major float4x4 g_ViewMatrix;   // Index:   12 13 14 15       Components:    16 [unused]
//   row_major float4x4 g_NDCToWorld;   // Index:   16 17 18 19       Components:    16 [unused]
//   row_major float4x4 g_OverlaySamplingMatrix;// Index:   20 21 22 23       Components:    16 [unused]
//   row_major float4x4 g_ShadowMapSamplingMatrix;// Index:   24 25 26 27       Components:    16 [unused]
//   row_major float4x4 g_ShadowMapSamplingMatrixInverse;// Index:   28 29 30 31       Components:    16 [unused]
//   float4 g_vDynLightingGridInfo;     // Index:   32.xyzw           Components:     4 [unused]
//   float3 g_vLightDirection;          // Index:   33.xyz            Components:     3 [unused]
//   float g_ShadowZBias;               // Index:   33.w              Components:     1 [unused]
//   float4 g_MainPassDimensions;       // Index:   34.xyzw           Components:     4 [unused]
//   float4 g_FinalDimensions;          // Index:   35.xyzw           Components:     4 [unused]
//   float4 g_ShadowMapDimensions;      // Index:   36.xyzw           Components:     4 [unused]
//   int g_bSSOverlay;                  // Index:   37.x              Components:     1 [unused]
//   int g_bShadows;                    // Index:   37.y              Components:     1 [unused]
//   int g_nPixelsPerBlock;             // Index:   37.z              Components:     1 [unused]
//   uint g_nRTSamples;                 // Index:   37.w              Components:     1 [unused]
//   float g_fMipBias;                  // Index:   38.x              Components:     1 [unused]
//   float2 g_vNearFar;                 // Index:   38.yz             Components:     2 [unused]
//   float g_SceneExposure;             // Index:   38.w              Components:     1 [unused]
//   float g_InvSceneExposure;          // Index:   39.x              Components:     1 [unused]
//   float g_IntermediateExposure;      // Index:   39.y              Components:     1 [unused]
//   float g_InvIntermediateExposure;   // Index:   39.z              Components:     1 [unused]
//   float4 g_vFogParams;               // Index:   40.xyzw           Components:     4 [unused]
//   float4 g_vFogSkyColor_IntegralDensity;// Index:   41.xyzw           Components:     4 [unused]
//   float3 g_vFogLightColor;           // Index:   42.xyz            Components:     3 [unused]
//   float3 g_vWorldWrapTranslation;    // Index:   43.xyz            Components:     3 [unused]
//   float3 g_vEyePosition;             // Index:   44.xyz            Components:     3 [unused]
//   float3 g_vLightColor;              // Index:   45.xyz            Components:     3 [unused]
//   float4 g_EnvSHPremultipliedIrradiance[7];// Index:   46-52             Components:    28 [unused]
//   float4 g_EnvSHRadiance[7];         // Index:   53-59             Components:    28 [unused]
//   float3 g_vSkySH;                   // Index:   60.xyz            Components:     3 [unused]
//   float g_DoTonemap;                 // Index:   60.w              Components:     1 [unused]
//   float g_LightMapWeight;            // Index:   61.x              Components:     1 [unused]
//   float g_fModelTime;                // Index:   61.y              Components:     1 [unused]
//   float2 g_vPixelMultiplier;         // Index:   61.zw             Components:     2 [unused]
//   float4 g_FOWFullFogParchmentUVTransform;// Index:   62.xyzw           Components:     4 [unused]
//   float3 g_FOWCoastStripeColor;      // Index:   63.xyz            Components:     3 [unused]
//   float g_FOWCoastStripeThickness;   // Index:   63.w              Components:     1 [unused]
//   float3 g_FOWTintColor;             // Index:   64.xyz            Components:     3 [unused]
//   float g_fFOWBorderNoiseUVScale;    // Index:   64.w              Components:     1 [unused]
//   float3 g_vFOWBorderColor;          // Index:   65.xyz            Components:     3 [unused]
//   float g_fFOWBorderNoiseIntensity;  // Index:   65.w              Components:     1 [unused]
//   float3 g_FOWTerrainHatchColor;     // Index:   66.xyz            Components:     3 [unused]
//   float g_FOWTerrainHatchTextureCount;// Index:   66.w              Components:     1 [unused]
//   float4 g_FOWTerrainHatchUVTransform;// Index:   67.xyzw           Components:     4 [unused]
//   float3 g_FOWModelsHatchColor;      // Index:   68.xyz            Components:     3 [unused]
//   float g_FOWModelsHatchTextureCount;// Index:   68.w              Components:     1 [unused]
//   float4 g_FOWModelsHatchUVTransform;// Index:   69.xyzw           Components:     4 [unused]
//   float3 g_FOWModelsStrokeColor;     // Index:   70.xyz            Components:     3 [unused]
//   float g_FOWModelsStrokeOpacity;    // Index:   70.w              Components:     1 [unused]
//   float4 g_FOWFlowLineColor;         // Index:   71.xyzw           Components:     4 [unused]
//   float3 g_FOWFlowLinePositionBias;  // Index:   72.xyz            Components:     3 [unused]
//   float g_FOWFlowLineThickness;      // Index:   72.w              Components:     1 [unused]
//   float g_FOWModelsParchmentWeight;  // Index:   73.x              Components:     1 [unused]
//   float g_FOWModelsStrokeThickness;  // Index:   73.y              Components:     1 [unused]
//   float g_FOWStrokeOpacityMultiplier;// Index:   73.z              Components:     1 [unused]
//   row_major float4x4 g_TerrainHexToWorld;// Index:   74 75 76 77       Components:    16 [unused]
//   float g_TerrainFlatHeight;         // Index:   78.x              Components:     1 [unused]
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// SkinnedModelDynamics_Tint         tbuffer      NA          NA   31        1
// WorldViewGlobals                  cbuffer      NA          NA    1        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION                 0   xy          0     NONE    uint   xy
// TEXCOORD                 0   xy          1     NONE   float   xy
// BLENDINDICES             0   xyzw        2     NONE    uint   xyz
// BLENDWEIGHT              0   xyzw        3     NONE   float   xyz
// FXS_INSTANCEID           0   x           4     NONE    uint   x
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// TEXCOORD                 0   xy          0     NONE   float   xy
// SV_POSITION              0   xyzw        1      POS   float   xyzw
//
vs_5_0

dcl_constantbuffer cb12[0], immediateIndexed

dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb1[4], immediateIndexed
dcl_resource_buffer (mixed,mixed,mixed,mixed) t31
dcl_input v0.xy
dcl_input v1.xy
dcl_input v2.xyz
dcl_input v3.xyz
dcl_input v4.x
dcl_output o0.xy
dcl_output_siv o1.xyzw, position
dcl_temps 9
and r0.xy, v0.xyxx, l(0x0000ffff, 0x0000ffff, 0, 0)
ushr r0.z, v0.x, l(16)
f16tof32 r1.xyz, r0.xzyx
dp3 r0.x, v3.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
div r0.x, l(1.000000, 1.000000, 1.000000, 1.000000), r0.x
mul r0.xyz, r0.xxxx, v3.xyzx
imul null, r0.w, v4.x, l(183)
imad r2.x, v2.x, l(3), r0.w
iadd r2.xyz, r2.xxxx, l(5, 4, 3, 0)
ld_indexable(buffer)(mixed,mixed,mixed,mixed) r3.xyzw, r2.xxxx, t31.xyzw
ld_indexable(buffer)(mixed,mixed,mixed,mixed) r4.xyzw, r2.yyyy, t31.xyzw
ld_indexable(buffer)(mixed,mixed,mixed,mixed) r2.xyzw, r2.zzzz, t31.xyzw
mul r2.xyzw, r0.xxxx, r2.xyzw
mul r4.xyzw, r0.xxxx, r4.xyzw
mul r3.xyzw, r0.xxxx, r3.xyzw
lt r5.xy, l(0.000000, 0.000000, 0.000000, 0.000000), r0.yzyy
if_nz r5.x
  imad r0.x, v2.y, l(3), r0.w
  iadd r5.xzw, r0.xxxx, l(5, 0, 4, 3)
  ld_indexable(buffer)(mixed,mixed,mixed,mixed) r6.xyzw, r5.xxxx, t31.xyzw
  ld_indexable(buffer)(mixed,mixed,mixed,mixed) r7.xyzw, r5.zzzz, t31.xyzw
  ld_indexable(buffer)(mixed,mixed,mixed,mixed) r8.xyzw, r5.wwww, t31.xyzw
  mad r2.xyzw, r8.xyzw, r0.yyyy, r2.xyzw
  mad r4.xyzw, r7.xyzw, r0.yyyy, r4.xyzw
  mad r3.xyzw, r6.xyzw, r0.yyyy, r3.xyzw
endif
if_nz r5.y
  imad r0.x, v2.z, l(3), r0.w
  iadd r0.xyw, r0.xxxx, l(5, 4, 0, 3)
  ld_indexable(buffer)(mixed,mixed,mixed,mixed) r5.xyzw, r0.xxxx, t31.xyzw
  ld_indexable(buffer)(mixed,mixed,mixed,mixed) r6.xyzw, r0.yyyy, t31.xyzw
  ld_indexable(buffer)(mixed,mixed,mixed,mixed) r7.xyzw, r0.wwww, t31.xyzw
  mad r2.xyzw, r7.xyzw, r0.zzzz, r2.xyzw
  mad r4.xyzw, r6.xyzw, r0.zzzz, r4.xyzw
  mad r3.xyzw, r5.xyzw, r0.zzzz, r3.xyzw
endif
mov r1.w, l(1.000000)
dp4 r0.x, r1.xyzw, r2.xyzw
dp4 r0.y, r1.xyzw, r4.xyzw
dp4 r0.z, r1.xyzw, r3.xyzw
mul r1.xyzw, r0.yyyy, cb1[1].xyzw
mad r1.xyzw, r0.xxxx, cb1[0].xyzw, r1.xyzw
mad r0.xyzw, r0.zzzz, cb1[2].xyzw, r1.xyzw
add o1.xyzw, r0.xyzw, cb1[3].xyzw
mov o0.xy, v1.xyxx
ret
// Approximately 46 instruction slots used

///////////////////////////////// HLSL Code /////////////////////////////////
// // ---- Created with 3Dmigoto v1.3.16 on Sat Aug 15 15:49:17 2020
// Buffer<mixed4> t31 : register(t31);
//
//
// 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(
//   uint2 v0 : POSITION0,
//   float2 v1 : TEXCOORD0,
//   uint4 v2 : BLENDINDICES0,
//   float4 v3 : BLENDWEIGHT0,
//   uint v4 : FXS_INSTANCEID0,
//   out float2 o0 : TEXCOORD0,
//   out float4 o1 : SV_POSITION0)
// {
//   float4 r0,r1,r2,r3,r4,r5,r6,r7,r8;
//   uint4 bitmask, uiDest;
//   float4 fDest;
//
//   r0.xy = (int2)v0.xy & int2(0xffff,0xffff);
//   r0.z = (uint)v0.x >> 16;
//   r1.xyz = f16tof32(r0.xzy);
//   r0.x = dot(v3.xyz, float3(1,1,1));
//   r0.x = 1 / r0.x;
//   r0.xyz = v3.xyz * r0.xxx;
//   r0.w = (int)v4.x * 183;
//   r2.x = mad((int)v2.x, 3, (int)r0.w);
//   r2.xyz = (int3)r2.xxx + int3(5,4,3);
//   r3.xyzw = t31.Load(r2.x).xyzw;
//   r4.xyzw = t31.Load(r2.y).xyzw;
//   r2.xyzw = t31.Load(r2.z).xyzw;
//   r2.xyzw = r2.xyzw * r0.xxxx;
//   r4.xyzw = r4.xyzw * r0.xxxx;
//   r3.xyzw = r3.xyzw * r0.xxxx;
//   r5.xy = cmp(float2(0,0) < r0.yz);
//   if (r5.x != 0) {
//     r0.x = mad((int)v2.y, 3, (int)r0.w);
//     r5.xzw = (int3)r0.xxx + int3(5,4,3);
//     r6.xyzw = t31.Load(r5.x).xyzw;
//     r7.xyzw = t31.Load(r5.z).xyzw;
//     r8.xyzw = t31.Load(r5.w).xyzw;
//     r2.xyzw = r8.xyzw * r0.yyyy + r2.xyzw;
//     r4.xyzw = r7.xyzw * r0.yyyy + r4.xyzw;
//     r3.xyzw = r6.xyzw * r0.yyyy + r3.xyzw;
//   }
//   if (r5.y != 0) {
//     r0.x = mad((int)v2.z, 3, (int)r0.w);
//     r0.xyw = (int3)r0.xxx + int3(5,4,3);
//     r5.xyzw = t31.Load(r0.x).xyzw;
//     r6.xyzw = t31.Load(r0.y).xyzw;
//     r7.xyzw = t31.Load(r0.w).xyzw;
//     r2.xyzw = r7.xyzw * r0.zzzz + r2.xyzw;
//     r4.xyzw = r6.xyzw * r0.zzzz + r4.xyzw;
//     r3.xyzw = r5.xyzw * r0.zzzz + r3.xyzw;
//   }
//   r1.w = 1;
//   r0.x = dot(r1.xyzw, r2.xyzw);
//   r0.y = dot(r1.xyzw, r4.xyzw);
//   r0.z = dot(r1.xyzw, r3.xyzw);
//   r1.xyzw = g_ViewProjMatrix._m10_m11_m12_m13 * r0.yyyy;
//   r1.xyzw = r0.xxxx * g_ViewProjMatrix._m00_m01_m02_m03 + r1.xyzw;
//   r0.xyzw = r0.zzzz * g_ViewProjMatrix._m20_m21_m22_m23 + r1.xyzw;
//   o1.xyzw = g_ViewProjMatrix._m30_m31_m32_m33 + r0.xyzw;
//   o0.xy = v1.xy;
//   return;
// }
//////////////////////////////// HLSL Errors ////////////////////////////////
// D:\SteamLibrary\steamapps\common\Sid Meier's Civilization VI\Base\Binaries\Win64Steam\ShaderFixes\d9143a19d9d5977b-vs_replace.txt(2,8-13): error X3000: syntax error: unexpected token 'mixed4'
/////////////////////////////////////////////////////////////////////////////
