// shadows
// Generated by Microsoft (R) HLSL Shader Compiler 10.0.10011.16384
//
//   using 3Dmigoto v1.3.16 on Sat Aug 15 13:44:34 2020
//
//
// Buffer Definitions:
//
// cbuffer WorldView_TerrainDynamic
// {
//
//   int2 gd_hiCellBase;                // Offset:    0 Size:     8
//   float4 gd_v4Scale;                 // Offset:   16 Size:    16 [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
//   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]
//
// }
//
// cbuffer WorldView_TerrainGlobals
// {
//
//   float4x3 gg_mToWorld;              // Offset:    0 Size:    48
//   float2 gg_CellGridSize;            // Offset:   48 Size:     8 [unused]
//   float gg_fFlatHeight;              // Offset:   56 Size:     4
//   float gg_fFlatteningFactor;        // Offset:   60 Size:     4
//   float gg_fFuzz;                    // Offset:   64 Size:     4 [unused]
//   float2 gg_OverlayScale;            // Offset:   68 Size:     8 [unused]
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// SS_DEFAULT_CLAMP                  sampler      NA          NA    2        1
// HeightMask                        texture  float4          2d   26        1
// WorldView_TerrainDynamic          cbuffer      NA          NA    0        1
// WorldViewGlobals                  cbuffer      NA          NA    1        1
// WorldView_TerrainGlobals          cbuffer      NA          NA    2        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION                 0   xy          0     NONE     int   xy
// TEXCOORD                 0   x           1     NONE    uint   x
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   float   xyzw
//
vs_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[1], immediateIndexed
dcl_constantbuffer cb1[24], immediateIndexed
dcl_constantbuffer cb2[4], immediateIndexed
dcl_sampler s2, mode_default
dcl_resource_texture2d (float,float,float,float) t26
dcl_input v0.xy
dcl_input v1.x
dcl_output_siv o0.xyzw, position
dcl_temps 3

dcl_constantbuffer cb12[0], immediateIndexed

iadd r0.xy, v0.xyxx, cb0[0].xyxx
itof r0.xy, r0.xyxx
dp2 r0.z, r0.xyxx, cb2[1].xyxx
add r0.w, -r0.y, -r0.x
dp2 r0.x, r0.xyxx, cb2[0].xyxx
mad r0.x, r0.w, cb2[0].z, r0.x
mad r0.y, r0.w, cb2[1].z, r0.z
add r0.y, r0.y, cb2[1].w
add r0.x, r0.x, cb2[0].w
mul r1.xyz, r0.yyyy, cb1[21].xywx
mul r2.xyzw, r0.yyyy, cb1[1].xyzw
mad r2.xyzw, r0.xxxx, cb1[0].xyzw, r2.xyzw
mad r0.xyz, r0.xxxx, cb1[20].xywx, r1.xyzx
add r0.xyz, r0.xyzx, cb1[23].xywx
div r0.xy, r0.xyxx, r0.zzzz
sample_l_indexable(texture2d)(float,float,float,float) r0.xy, r0.xyxx, t26.xyzw, s2, l(0.000000)
add r0.y, r0.y, l(-0.400000)
mul_sat r0.y, r0.y, l(4.99999952)
mad r0.z, r0.y, l(-2.000000), l(3.000000)
mul r0.y, r0.y, r0.y
mul r0.y, r0.y, r0.z
add r0.z, l(1.000000), -cb2[3].w
mad r0.y, r0.y, r0.z, cb2[3].w
f16tof32 r0.z, v1.x
add r0.w, r0.z, -cb2[3].z
mad r0.y, r0.y, r0.w, cb2[3].z
min r0.y, r0.y, r0.z
mul r0.x, r0.x, r0.y
mad r0.xyzw, r0.xxxx, cb1[2].xyzw, r2.xyzw
add o0.xyzw, r0.xyzw, cb1[3].xyzw
ret
// Approximately 31 instruction slots used

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