//wind shadows
// MANUALLY DUMPED [ShaderRegex\ShaderFixes\regex.ini\Halo_CB0_3_r0]
//
// Generated by Microsoft (R) HLSL Shader Compiler 10.0.10011.16384
//
//   using 3Dmigoto v1.3.16 on Sat Aug 15 16:04:15 2020
//
//
// Buffer Definitions:
//
// cbuffer FXModel_Rigid_Dynamics
// {
//
//   float4 g_UVOffset0_Rigid;          // Index:    0.xyzw           Components:     4 [unused]
//   float4 g_UVOffset1_Rigid;          // Index:    1.xyzw           Components:     4 [unused]
//   float4 g_TapWeight0_Rigid;         // Index:    2.xyzw           Components:     4 [unused]
//   float4 g_TapWeight1_Rigid;         // Index:    3.xyzw           Components:     4 [unused]
//   float4 g_Layer0Tint_Rigid;         // Index:    4.xyzw           Components:     4 [unused]
//   float4 g_Layer1Tint_Rigid;         // Index:    5.xyzw           Components:     4 [unused]
//   float4x3 g_WorldMatrix;            // Index:    6 7 8            Components:    12
//
// }
//
// 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
// ------------------------------ ---------- ------- ----------- ---- --------
// FXModel_Rigid_Dynamics            cbuffer      NA          NA    0        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
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// TEXCOORD                 0   xy          0     NONE   float   xy
// TEXCOORD                 1   xyz         1     NONE   float   xyz
// TEXCOORD                 2   xyz         2     NONE   float   xyz
// TEXCOORD                 3   xyz         3     NONE   float   xyz
// SV_POSITION              0   xyzw        4      POS   float   xyzw
//
vs_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[9], immediateIndexed
dcl_constantbuffer cb1[4], immediateIndexed
dcl_input v0.xy
dcl_input v1.xy
dcl_output o0.xy
dcl_output o1.xyz
dcl_output o2.xyz
dcl_output o3.xyz
dcl_output_siv o4.xyzw, position
dcl_temps 4

dcl_constantbuffer cb12[0], immediateIndexed

dcl_resource_texture2d (float,float,float,float) t125
mov o0.xy, v1.xyxx
ibfe r0.x, l(8), l(16), v0.y
ishr r0.z, v0.y, l(24)
itof r0.xy, r0.xzxx
mul r0.xy, r0.xyxx, l(0.00787401572, 0.00787401572, 0.000000, 0.000000)
max r0.xy, r0.xyxx, l(-1.000000, -1.000000, 0.000000, 0.000000)
ge r0.zw, r0.xxxy, l(0.000000, 0.000000, 0.000000, 0.000000)
movc r0.zw, r0.zzzw, l(0,0,1.000000,1.000000), l(0,0,-1.000000,-1.000000)
add r1.xy, -|r0.yxyy|, l(1.000000, 1.000000, 0.000000, 0.000000)
mul r0.zw, r0.zzzw, r1.xxxy
add r1.z, -|r0.y|, r1.y
lt r1.w, r1.z, l(0.000000)
movc r1.xy, r1.wwww, r0.zwzz, r0.xyxx
dp3 r0.x, r1.xyzx, cb0[6].xyzx
dp3 r0.y, r1.xyzx, cb0[7].xyzx
dp3 r0.z, r1.xyzx, cb0[8].xyzx
dp3 r0.w, r0.xyzx, r0.xyzx
rsq r0.w, r0.w
mul o1.xyz, r0.wwww, r0.xyzx
ushr r0.x, v0.x, l(16)
f16tof32 r0.y, r0.x
and r1.xy, v0.xyxx, l(0x0000ffff, 0x0000ffff, 0, 0)
f16tof32 r0.xz, r1.xxyx
mov r0.w, l(1.000000)
dp4 r1.x, r0.xyzw, cb0[6].xyzw
dp4 r1.y, r0.xyzw, cb0[7].xyzw
dp4 r1.z, r0.xyzw, cb0[8].xyzw
mov o2.xyz, r1.xyzx
mov o3.xyz, r1.xyzx
mul r0.xyzw, r1.yyyy, cb1[1].xyzw
mad r0.xyzw, r1.xxxx, cb1[0].xyzw, r0.xyzw
mad r0.xyzw, r1.zzzz, cb1[2].xyzw, r0.xyzw
add r0.xyzw, r0.xyzw, cb1[3].xyzw

ld_indexable(texture2d)(float,float,float,float) r2.xyzw, l(0, 0, 0, 0), t125.xyzw
add r3.x, r0.w, -r2.y
//mad r0.x, r2.x, r3.x, r0.x

max r0.z, r0.z, l(0.000000)
min o4.z, r0.w, r0.z
mov o4.xyw, r0.xyxw
ret
// Approximately 37 instruction slots used
