//Shadows PS from cache.
//
// Generated by Microsoft (R) HLSL Shader Compiler 10.0.10011.16384
//
//   using 3Dmigoto v1.3.16 on Fri Jan 14 20:08:17 2022
//
//
// Buffer Definitions:
//
// cbuffer ConstBuf__viewData
// {
//
//   struct ViewData
//   {
//
//       float4x4 view;                 // Index:    0
//       float4x4 invView;              // Index:    4
//       float4x4 proj;                 // Index:    8
//       float4x4 invViewProjNoZReproj; // Index:   12
//       float4x4 viewProj;             // Index:   16
//       float4x4 invViewProj;          // Index:   20
//       float4x4 previousViewProj;     // Index:   24
//       float4 prevLodEyePos;          // Index:   28
//       float4 lodEyePos;              // Index:   29
//       float4 viewDirDepthBias;       // Index:   30
//       float3 eyePos;                 // Index:   31
//       float2 viewportSize;           // Index:   32
//       float2 invViewportSize;        // Index:   32.z
//       float4 mirrorPlaneWS;          // Index:   33
//       float2 mirrorViewportSize;     // Index:   34
//       float2 opaqueRefractionViewportSize;// Index:   34.z
//       float windTime;                // Index:   35
//       float deltaTime;               // Index:   35.y
//       float depthReprojectScale;     // Index:   35.z
//       float depthReprojectBias;      // Index:   35.w
//       uint shadowViewType;           // Index:   36
//       float normalDepthBias;         // Index:   36.y
//       float noNormalAA;              // Index:   36.z
//       float noNormalFromAlpha;       // Index:   36.w
//       float noOpaqueTransparency;    // Index:   37
//       float translucentAmount;       // Index:   37.y
//       uint framePhase;               // Index:   37.z
//       float cameraAmbientExposure;   // Index:   37.w
//       float fxExposure;              // Index:   38
//       float fxAmbientExposure;       // Index:   38.y
//       uint checkerboardPhase;        // Index:   38.z
//       float sparkleIntensityScale;   // Index:   38.w
//
//   } resourceTables__viewData;        // Index:    0-38             Components:   156
//
// }
//
// cbuffer ConstBuf__materialData
// {
//
//   struct MaterialData
//   {
//
//       float3 Main_Blast_normal_matU; // Index:    0
//       float3 Main_Blast_normal_matV; // Index:    1
//       float3 Main_Blast_emissive_matU;// Index:    2
//       float3 Main_Blast_emissive_matV;// Index:    3
//       float3 Main_Blast_alpha_matU;  // Index:    4
//       float3 Main_Blast_alpha_matV;  // Index:    5
//       float Main_Blast_cst_AlphaReference;// Index:    5.w
//
//   } resourceTables__materialData;    // Index:    0-5              Components:    24
                                        // Textures:  t41-t44
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// resourceTables__viewData__smpLinear    sampler      NA          NA    1        1
// resourceTables__viewData__smpLowAniso    sampler      NA          NA    2        1
// resourceTables__passData.depthTexture    texture  float4          2d    0        1
// resourceTables__materialData.material_dudv1    texture  float4          2d   41        1
// resourceTables__materialData.Main_Blast_normal    texture  float4          2d   42        1
// resourceTables__materialData.Main_Blast_alpha    texture  float4          2d   44        1
// ConstBuf__viewData                cbuffer      NA          NA    3        1
// ConstBuf__materialData            cbuffer      NA          NA    4        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   float   xyz
// VERT_ID                  0   x           1     NONE    uint
// TEXCOORD                 0   xy          2     NONE   float   xy
// NORMAL                   0   xyz         3     NONE   float   xyz
// TANGENT                  0   xyz         4     NONE   float   xyz
// BINORMAL                 0   xyz         5     NONE   float   xyz
// TEXCOORD                 5   xyzw        6     NONE   float   x
// TEXCOORD                 8   xyz         7     NONE   float
// SV_IsFrontFace           0   x           8    FFACE    uint   x
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target                0   xyzw        0   TARGET   float   xyzw
//
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb3[36], immediateIndexed
dcl_constantbuffer cb4[6], immediateIndexed
dcl_sampler s1, mode_default
dcl_sampler s2, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_resource_texture2d (float,float,float,float) t41
dcl_resource_texture2d (float,float,float,float) t42
dcl_resource_texture2d (float,float,float,float) t44
dcl_input_ps_siv linear noperspective v0.xyz, position
dcl_input_ps linear v2.xy
dcl_input_ps linear v3.xyz
dcl_input_ps linear v4.xyz
dcl_input_ps linear v5.xyz
dcl_input_ps linear v6.x
dcl_input_ps_sgv v8.x, is_front_face
dcl_output o0.xyzw
dcl_temps 50
dcl_resource_texture2d (float,float,float,float) t125
ld_indexable(texture2d)(float,float,float,float) r40.xyzw, l(0, 0, 0, 0), t125.xyzw
dp3 r0.x, v5.xyzx, v5.xyzx
rsq r0.x, r0.x
mul r0.xyz, r0.xxxx, v5.xyzx
add r0.w, l(0.025000), cb3[35].x
mul r0.w, r0.w, l(20.000000)
frc r0.w, r0.w
add r0.w, r0.w, l(-0.500000)
mov r1.xy, v2.xyxx
mov r1.z, l(1.000000)
dp3 r2.x, l(-0.00000723998028, -2.000000, 2.00000358, 0.000000), r1.xyzx
dp3 r2.y, l(2.000000, -0.00000723998028, 0.00000363588333, 0.000000), r1.xyzx
sample_indexable(texture2d)(float,float,float,float) r1.xy, r2.xyxx, t41.xyzw, s1
mad r1.xy, r1.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-0.996078432, -0.996078432, 0.000000, 0.000000)
mul r1.xy, r1.xyxx, l(0.200000, 0.200000, 0.000000, 0.000000)
mad r2.xy, r1.xyxx, r0.wwww, v2.xyxx
mov r2.z, l(1.000000)
dp3 r3.x, cb4[0].xyzx, r2.xyzx
dp3 r3.y, cb4[1].xyzx, r2.xyzx
sample_indexable(texture2d)(float,float,float,float) r3.xyz, r3.xyxx, t42.xyzw, s2
mul r0.w, l(20.000000), cb3[35].x
frc r0.w, r0.w
add r1.z, r0.w, l(-0.500000)
mul r0.w, r0.w, l(6.28318548)
sincos null, r0.w, r0.w
mad r0.w, r0.w, l(0.500000), l(0.500000)
mad r1.xy, r1.xyxx, r1.zzzz, v2.xyxx
mov r1.z, l(1.000000)
dp3 r4.x, cb4[0].xyzx, r1.xyzx
dp3 r4.y, cb4[1].xyzx, r1.xyzx
sample_indexable(texture2d)(float,float,float,float) r4.xyz, r4.xyxx, t42.xyzw, s2
add r3.xyz, r3.xyzx, -r4.xyzx
mad r3.xyz, r0.wwww, r3.xyzx, r4.xyzx
mad r3.xyz, r3.xyzx, l(2.007874, 2.007874, 2.007874, 0.000000), l(-1.007874, -1.007874, -1.007874, 0.000000)
dp2 r1.w, cb4[0].xyxx, cb4[0].xyxx
rsq r1.w, r1.w
mul r4.xy, r1.wwww, cb4[0].xyxx
mov r4.z, -r4.y
dp2 r5.y, r4.zxzz, r3.xyxx
dp2 r5.x, r4.xyxx, r3.xyxx
mov r5.z, r3.z
dp3 r1.w, r5.xyzx, r5.xyzx
sqrt r1.w, r1.w
max r1.w, r1.w, l(0.000010)
rcp r1.w, r1.w
mul r3.xyz, r1.wwww, r5.xyzx
dp3 r1.w, r3.xyzx, r3.xyzx
rsq r1.w, r1.w
mul r3.xyz, r1.wwww, r3.xyzx
mul r0.xyz, r0.xyzx, r3.yyyy
dp3 r1.w, v4.xyzx, v4.xyzx
rsq r1.w, r1.w
mul r4.xyz, r1.wwww, v4.xyzx
mad r0.xyz, r3.xxxx, r4.xyzx, r0.xyzx
movc r3.xyw, v8.xxxx, v3.xyxz, -v3.xyxz
dp3 r1.w, r3.xywx, r3.xywx
rsq r1.w, r1.w
mul r3.xyw, r1.wwww, r3.xyxw
mad r0.xyz, r3.zzzz, r3.xywx, r0.xyzx
dp3 r1.w, r0.xyzx, r0.xyzx
rsq r1.w, r1.w
mul r0.xyz, r0.xyzx, r1.wwww
mad r1.w, v0.z, cb3[35].z, cb3[35].w
rcp r1.w, r1.w
mov r4.z, -r1.w
mul r5.xy, v0.xyxx, cb3[32].zwzz
mad r5.xy, r5.xyxx, l(2.000000, -2.000000, 0.000000, 0.000000), l(-1.000000, 1.000000, 0.000000, 0.000000)
mul r4.xy, r4.zzzz, r5.xyxx
mov r4.w, l(1.000000)

add r40.w, r4.z, -r40.y
mad r4.x, -r40.x, r40.w, r4.x

dp4 r6.x, r4.xyzw, cb3[12].xyzw
dp4 r6.y, r4.xyzw, cb3[13].xyzw
dp4 r6.z, r4.xyzw, cb3[14].xyzw
add r4.xyz, -r6.xyzx, cb3[31].xyzx

//Tessellation specular PS..
mul r41.xyz, r40.yyyy, cb3[16].xyzx
mul r41.w, cb3[16].x, cb3[16].x
mad r41.w, cb3[16].y, cb3[16].y, r41.w
mad r41.w, cb3[16].z, cb3[16].z, r41.w
div r41.xyz, r41.xyzx, r41.wwww
mad r4.x, r40.x, r41.x, r4.x
mad r4.y, r40.x, r41.y, r4.y
mad r4.z, r40.x, r41.z, r4.z

dp3 r1.w, r4.xyzx, r4.xyzx
rsq r1.w, r1.w
mul r4.xyz, r1.wwww, r4.xyzx
dp3 r1.w, -r4.xyzx, r0.xyzx
add r1.w, r1.w, r1.w
mad r0.xyz, r0.xyzx, -r1.wwww, -r4.xyzx
add r4.xyz, r6.xyzx, -r0.xyzx
mov r4.w, l(1.000000)
dp4 r0.x, r4.xyzw, cb3[16].xyzw
dp4 r0.y, r4.xyzw, cb3[17].xyzw
dp4 r0.z, r4.xyzw, cb3[19].xyzw

add r40.w, r0.z, -r40.y
mad r0.x, r40.x, r40.w, r0.x

div r0.xy, r0.xyxx, r0.zzzz
add r0.xy, -r5.xyxx, r0.xyxx
dp3 r4.x, cb4[4].xyzx, r2.xyzx
dp3 r4.y, cb4[5].xyzx, r2.xyzx
sample_indexable(texture2d)(float,float,float,float) r0.z, r4.xyxx, t44.yzxw, s2
dp3 r2.x, cb4[4].xyzx, r1.xyzx
dp3 r2.y, cb4[5].xyzx, r1.xyzx
sample_indexable(texture2d)(float,float,float,float) r1.x, r2.xyxx, t44.xyzw, s2
add r0.z, r0.z, -r1.x
mad r0.z, r0.w, r0.z, r1.x
add r1.xyz, -r6.xyzx, cb3[29].xyzx

//Tessellation specular PS..
mul r41.xyz, r40.yyyy, cb3[16].xyzx
mul r41.w, cb3[16].x, cb3[16].x
mad r41.w, cb3[16].y, cb3[16].y, r41.w
mad r41.w, cb3[16].z, cb3[16].z, r41.w
div r41.xyz, r41.xyzx, r41.wwww
mad r1.x, r40.x, r41.x, r1.x
mad r1.y, r40.x, r41.y, r1.y
mad r1.z, r40.x, r41.z, r1.z

dp3 r0.w, r1.xyzx, r1.xyzx
rsq r0.w, r0.w
mul r1.xyz, r0.wwww, r1.xyzx
dp3 r0.w, r3.xywx, r1.xyzx
min r0.w, |r0.w|, l(1.000000)
dp2 r1.x, r5.xyxx, r5.xyxx
mul r1.yz, r5.xxyx, r5.xxyx
mul r1.yz, r1.yyzy, r1.yyzy
mad r1.yz, -r1.yyzy, r1.yyzy, l(0.000000, 1.000000, 1.000000, 0.000000)
sqrt r1.x, r1.x
add_sat r1.x, -r1.x, l(2.000000)
mul r1.w, r1.x, r1.x
mad r1.x, -r1.x, l(2.000000), l(3.000000)
mul r1.x, r1.x, r1.w
mul r0.w, r0.w, r1.x
mul r0.z, r0.w, r0.z
mad_sat r0.z, r0.z, v6.x, -cb4[5].w
mov r6.w, l(1.000000)
dp4 r0.w, r6.xyzw, cb3[2].xyzw
ftoi r2.xy, v0.xyxx
mov r2.zw, l(0,0,0,0)
ld_indexable(texture2d)(float,float,float,float) r1.x, r2.xyzw, t0.xyzw
add r1.x, r0.w, r1.x
mov o0.w, -r0.w
mul_sat r0.w, r1.x, l(0.333333343)
add r1.x, -r0.w, l(1.000000)
lt r1.w, l(0.500000), r0.w
movc r0.w, r1.w, r1.x, r0.w
add r0.w, r0.w, r0.w
mul r1.x, r0.w, r0.w
mul r0.w, r0.w, r1.x
mul r1.x, r0.w, l(0.500000)
mad r0.w, -r0.w, l(0.500000), l(1.000000)
movc r0.w, r1.w, r0.w, r1.x
mul r0.z, r0.w, r0.z
mul r0.xy, r0.zzzz, r0.xyxx
mul r0.xy, r1.yzyy, r0.xyxx
dp2 r0.z, r0.xyxx, r0.xyxx
mov o0.xy, r0.xyxx
sqrt r0.x, r0.z
mul r0.x, r0.x, l(200.000000)
ftou r0.yz, v0.xxyx
and r0.yz, r0.yyzy, l(0, 1, 1, 0)
ine r0.y, r0.z, r0.y
movc o0.z, r0.y, l(-1.000000), r0.x
ret
// Approximately 140 instruction slots used
