//disabled - Anvil
// MANUALLY DUMPED [ShaderRegex\ShaderFixes\ShaderRegEx_UE4_UNIVERSAL2_C44.ini\_32_MultipleEffects0][ShaderRegex\ShaderFixes\ShaderRegEx_UE4_UNIVERSAL2_C44.ini\_40_MultipleAdditional]
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v1.3.16 on Wed Dec 29 10:24:33 2021
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// TEXCOORD                10   xyzw        0     NONE   float
// TEXCOORD                11   xyzw        1     NONE   float
// TEXCOORD                 0   xyzw        2     NONE   float   xyzw
// TEXCOORD                 1   xyzw        3     NONE   float   xy
// PARTICLE_VELOCITY        0   xyzw        4     NONE   float
// TEXCOORD                 7   xyzw        5     NONE   float      w
// SV_Position              0   xyzw        6      POS   float   xyzw
// SV_IsFrontFace           0   x           7    FFACE    uint
//
//
// 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 cb0[203], immediateIndexed
dcl_constantbuffer cb1[20], immediateIndexed
dcl_constantbuffer cb2[115], immediateIndexed
dcl_constantbuffer cb3[5], immediateIndexed
dcl_sampler s0, mode_default
dcl_sampler s1, mode_default
dcl_resource_texture3d (float,float,float,float) t0
dcl_resource_texture2d (float,float,float,float) t1
dcl_input_ps linear v2.xyzw
dcl_input_ps linear v3.xy
dcl_input_ps linear v5.w

dcl_input_ps_siv linear noperspective v6.xyzw, position

dcl_output o0.xyzw
dcl_temps 9
dcl_resource_texture2d (float,float,float,float) t125
add r0.xy, v6.xyxx, -cb0[129].xyxx
mad r0.xy, r0.xyxx, cb0[130].zwzz, l(-0.500000, -0.500000, 0.000000, 0.000000)

mul r0.xy, r0.xyxx, v6.wwww
mov r0.z, v6.w
mul r0.xyw, r0.xyxz, l(2.000000, -2.000000, 0.000000, 1.000000)
mul r6.xyzw, v6.yyyy, cb0[45].xyzw
//PS
mad r6.xyzw, v6.xxxx, cb0[44].xyzw, r6.xyzw
//PS
mad r6.xyzw, v6.zzzz, cb0[46].xyzw, r6.xyzw
add r6.xyzw, r6.xyzw, cb0[47].xyzw
mov r7.xyzw, v6.xyzw
ld_indexable(texture2d)(float,float,float,float) r5.xyzw, l(0, 0, 0, 0), t125.xyzw
mul r5.w, r5.y, r6.w
add r5.w, r5.w, l(-1.0)
mul r5.w, r5.w, cb0[130].x
mul r5.w, r5.w, l(0.500000)
mad r7.x, r5.x, r5.w, r7.x
mul r1.xyzw, v6.yyyy, cb0[45].xyzw

mad r1.xyzw, r7.xxxx, cb0[44].xyzw, r1.xyzw
//PS
mad r1.xyzw, v6.zzzz, cb0[46].xyzw, r1.xyzw
add r1.xyzw, r1.xyzw, cb0[47].xyzw

div r1.xyz, r1.xyzx, r1.wwww

add r1.xyz, r1.xyzx, -cb0[70].xyzx
mul r2.xyz, v2.wwww, v2.xyzx
add r3.xy, v3.xyxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
dp2 r1.w, r3.xyxx, r3.xyxx
sqrt r1.w, r1.w
mad r1.w, -r1.w, cb3[2].z, l(1.000000)
mul_sat r1.w, r1.w, cb3[3].z
max r1.w, r1.w, l(0.000001)
log r1.w, r1.w
mul r1.w, r1.w, cb3[3].w
exp r1.w, r1.w
mul r3.xyz, r1.wwww, r2.xyzx
mad r2.xyz, -r2.xyzx, r1.wwww, cb3[1].xyzx
mad r2.xyz, cb3[4].xxxx, r2.xyzx, r3.xyzx
div r0.xy, r0.xyxx, r0.wwww
mad r0.xy, r0.xyxx, cb0[66].xyxx, cb0[66].wzww
sample_l_indexable(texture2d)(float,float,float,float) r0.x, r0.xyxx, t1.xyzw, s1, l(0.000000)
mad r0.y, r0.x, cb0[65].x, cb0[65].y
mad r0.x, r0.x, cb0[65].z, -cb0[65].w
div r0.x, l(1.000000, 1.000000, 1.000000, 1.000000), r0.x
add r0.x, r0.x, r0.y
mad r0.x, -r0.z, l(1.000000), r0.x
div_sat r0.x, r0.x, cb3[4].z
mul_sat r0.w, r0.x, r3.x
lt r1.w, l(0.000000), cb2[114].w
if_nz r1.w
  mul r3.xyz, r1.yyyy, cb0[5].xywx
  mad r3.xyz, r1.xxxx, cb0[4].xywx, r3.xyzx

//PS
  mad r3.xyz, r1.zzzz, cb0[6].xywx, r3.xyzx
  add r3.xyz, r3.xyzx, cb0[7].xywx

ld_indexable(texture2d)(float,float,float,float) r8.xyzw, l(0, 0, 0, 0), t125.xyzw
add r8.w, r3.z, -r8.y
mad r3.x, r8.w, r8.x, r3.x
  div r3.xy, r3.xyxx, r3.zzzz

//add r3.x, r3.x, r8.x
  mad r4.xy, r3.xyxx, l(0.500000, -0.500000, 0.000000, 0.000000), l(0.500000, 0.500000, 0.000000, 0.000000)
  mad r1.w, r3.z, cb0[202].x, cb0[202].y
  log r1.w, r1.w
  mul r1.w, r1.w, cb0[202].z
  mul r4.z, r1.w, cb0[201].z
  sample_l_indexable(texture3d)(float,float,float,float) r1.w, r4.xyzx, t0.xyzw, s0, l(0.000000)
  mul r1.w, r1.w, v5.w
else
  mov r1.w, v5.w
endif
max r0.xyz, r2.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
lt r2.x, l(0.000000), cb0[139].x
if_nz r2.x
  add r2.xyz, r1.xyzx, -cb1[5].xyzx
  add r3.xyz, cb1[19].xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
  lt r2.xyz, r3.xyzx, |r2.xyzx|
  or r2.x, r2.y, r2.x
  or r2.x, r2.z, r2.x
  dp3 r1.x, r1.xyzx, l(0.577000, 0.577000, 0.577000, 0.000000)
  mul r1.x, r1.x, l(0.002000)
  frc r1.x, r1.x
  lt r1.x, l(0.500000), r1.x
  movc r3.yzw, r1.xxxx, l(0,0,1.000000,1.000000), l(0,1.000000,1.000000,0)
  mov r3.x, l(1.000000)
  movc r0.xyzw, r2.xxxx, r3.yzwx, r0.xyzw
endif
mul r0.xyz, r1.wwww, r0.xyzx
mul r0.xyz, r0.wwww, r0.xyzx
mul o0.xyz, r0.xyzx, cb0[134].yyyy
mov o0.w, l(0)

mov o0.xyz, l(0,0,0,0)

ret
// Approximately 0 instruction slots used
