//TAA objects PS from cache.
//
// Generated by Microsoft (R) HLSL Shader Compiler 10.0.10011.16384
//
//   using 3Dmigoto v1.3.16 on Fri Jan 14 20:07:44 2022
//
//
// Note: shader requires additional functionality:
//       64 UAV slots
//
//
// Buffer Definitions:
//
// cbuffer ConstBuf__modelData
// {
//
//   struct ModelData
//   {
//
//       uint lightGroupID;             // Index:    0
//       uint modelFlags;               // Index:    0.y
//       float lodFade;                 // Index:    0.z
//       float displacementBlend;       // Index:    0.w
//       int turbulenceDataIdx;         // Index:    1
//       int instanceOffset;            // Index:    1.y
//       int characterFxIdx;            // Index:    1.z
//       uint debugRenderChannel;       // Index:    1.w
//       uint decayWriteOffset;         // Index:    2
//       uint decayWriteMaxCount;       // Index:    2.y
//       uint decayAtomicCounterIndex;  // Index:    2.z
//       float modelAlpha;              // Index:    2.w
//       float emissiveScale;           // Index:    3
//       float desaturationScale;       // Index:    3.y
//       float decayCoverageEstimation; // Index:    3.z
//       float3 quantScale;             // Index:    4
//       float3 quantBias;              // Index:    5
//
//   } resourceTables__modelData;       // Index:    0-5.z            Components:    23
//
// }
//
// 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
                                        // Texture:   t8
//
// }
//
// cbuffer ConstBuf__materialData
// {
//
//   struct MaterialData
//   {
//
//       float3 material_vertexoffset_matU;// Index:    0
//       float3 material_vertexoffset_matV;// Index:    1
//       float2 material_cst_ParticleSpawnReference;// Index:    2
//
//   } resourceTables__materialData;    // Index:    0-2.y            Components:    10
                                        // Textures:  t11-t14
//
// }
//
//
// 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__viewData.blueNoiseTexture    texture   float     2darray    8        1
// resourceTables__materialData.material_particlespawn    texture  float4          2d   12        1
// resourceTables__materialData.layer_0__emissive    texture  float4          2d   13        1
// resourceTables__materialData.layer_1__alpha    texture  float4          2d   14        1
// resourceTables__passData.decaySpawnBuffer        UAV    uint         buf    8        1
// resourceTables__passData.decayAtomicCountersBuffer        UAV    uint         buf    9        1
// ConstBuf__modelData               cbuffer      NA          NA    1        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   xy w
// VERT_ID                  0   x           1     NONE    uint   x
// TEXCOORD                 0   xy          2     NONE   float   xy
// NORMAL                   0   xyz         3     NONE   float   xyz
// TANGENT                  0   xyz         4     NONE   float
// BINORMAL                 0   xyz         5     NONE   float
// TEXCOORD                 5   xyzw        6     NONE   float   x
// TEXCOORD                 8   xyz         7     NONE   float   xyz
// 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
// SV_Target                1   xyzw        1   TARGET   float   xyzw
// SV_Target                2   xyzw        2   TARGET   float   xyzw
// SV_Target                3   xyzw        3   TARGET   float   xyzw
// SV_Target                4   xy          4   TARGET   float   xy
//
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb1[4], immediateIndexed
dcl_constantbuffer cb3[38], immediateIndexed
dcl_constantbuffer cb4[3], immediateIndexed
dcl_sampler s1, mode_default
dcl_sampler s2, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_resource_texture2darray (float,float,float,float) t8
dcl_resource_texture2d (float,float,float,float) t12
dcl_resource_texture2d (float,float,float,float) t13
dcl_resource_texture2d (float,float,float,float) t14
dcl_uav_typed_buffer (uint,uint,uint,uint) u8
dcl_uav_typed_buffer (uint,uint,uint,uint) u9
dcl_input_ps_siv linear noperspective v0.xyw, position
dcl_input_ps constant v1.x
dcl_input_ps linear v2.xy
dcl_input_ps linear v3.xyz
dcl_input_ps linear v6.x
dcl_input_ps linear v7.xyz
dcl_input_ps_sgv v8.x, is_front_face
dcl_output o0.xyzw
dcl_output o1.xyzw
dcl_output o2.xyzw
dcl_output o3.xyzw
dcl_output o4.xy
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

and r0.x, v1.x, l(0x00ffffff)
ne r0.y, l(1.000000), cb1[2].w
if_nz r0.y
  ne r0.y, l(0.000000, 0.000000, 0.000000, 0.000000), cb3[37].x
  if_z r0.y
    ftoi r0.yz, v0.xxyx
    iadd r0.w, r0.x, l(1)
    and r0.w, r0.w, l(7)
    imad r0.yz, r0.wwww, l(0, 7, 7, 0), r0.yyzy
    and r1.xy, r0.yzyy, l(63, 63, 0, 0)
    and r1.z, l(7), cb3[37].z
    mov r1.w, l(0)
    ld_indexable(texture2darray)(float,float,float,float) r0.y, r1.xyzw, t8.yxzw
  else
    mov r0.y, l(0)
  endif
  ge r0.y, r0.y, cb1[2].w
  discard_nz r0.y
endif
mul r0.yz, v0.xxyx, cb3[32].zzwz
mad r0.yz, r0.yyzy, l(0.000000, 2.000000, -2.000000, 0.000000), l(0.000000, -1.000000, 1.000000, 0.000000)
movc r1.xyz, v8.xxxx, v3.xyzx, -v3.xyzx
dp3 r0.w, r1.xyzx, r1.xyzx
rsq r0.w, r0.w
mul r1.xyz, r0.wwww, r1.xyzx
mov r2.xz, v2.xxyx
mov r2.yw, l(0,1.000000,0,1.000000)
dp2 r2.x, l(1.500000, 0.250000, 0.000000, 0.000000), r2.xyxx
dp2 r2.y, l(1.500000, -0.300000, 0.000000, 0.000000), r2.zwzz
mov r3.xy, v2.xyxx
mov r3.z, l(1.000000)
dp3 r4.x, l(0.184579104, 1.99146438, -0.0880217552, 0.000000), r3.xyzx
dp3 r4.y, l(-4.978661, 0.461447775, 4.75860643, 0.000000), r3.xyzx
sample_indexable(texture2d)(float,float,float,float) r2.xyz, r2.xyxx, t13.xyzw, s1
sample_indexable(texture2d)(float,float,float,float) r0.w, r4.xyxx, t14.yzwx, s2
mad_sat r0.w, r0.w, v6.x, l(-0.117647)
lt r1.w, l(0.000000), r0.w
if_nz r1.w
  mul r3.xyz, r0.wwww, l(0.999999940, 0.353000, 0.042000, 0.000000)
  add r4.xyz, -r2.xyzx, l(1.025395, 2.79170012, 3.052480, 0.000000)
  mad r2.xyz, r0.wwww, r4.xyzx, r2.xyzx
  mov r0.w, r3.x
  mov r1.w, r3.x
else
  mov r0.w, l(0)
  mov r1.w, l(0)
  mov r3.xyz, l(0,0,0,0)
endif
ne r2.w, l(0.000000, 0.000000, 0.000000, 0.000000), cb3[36].z
deriv_rtx_fine r4.xyz, r1.xyzx
deriv_rty_fine r5.xyz, r1.xyzx
dp3 r3.w, r4.xyzx, r4.xyzx
dp3 r4.x, r5.xyzx, r5.xyzx
add r3.w, r3.w, r4.x
min r3.w, r3.w, l(0.300000)
movc r2.w, r2.w, l(0), r3.w
add r3.y, -r3.y, l(1.000000)
mul r3.y, r3.y, r3.y
mad r2.w, r3.y, r3.y, r2.w
sqrt r2.w, r2.w
min r2.w, r2.w, l(1.000000)
sqrt r2.w, r2.w
add o2.z, -r2.w, l(1.000000)
lt r2.w, r0.w, l(0.040450)
mul r3.y, r0.w, l(0.0773993805)
add r0.w, r0.w, l(0.055000)
mul r0.w, r0.w, l(0.947867334)
log r0.w, r0.w
mul r0.w, r0.w, l(2.400000)
exp r0.w, r0.w
movc r0.w, r2.w, r3.y, r0.w
lt r2.w, r1.w, l(0.040450)
mul r3.y, r1.w, l(0.0773993805)
add r1.w, r1.w, l(0.055000)
mul r1.w, r1.w, l(0.947867334)
log r1.w, r1.w
mul r1.w, r1.w, l(2.400000)
exp r1.w, r1.w
movc r1.w, r2.w, r3.y, r1.w
lt r2.w, r3.x, l(0.040450)
mul r3.y, r3.x, l(0.0773993805)
add r3.x, r3.x, l(0.055000)
mul r3.x, r3.x, l(0.947867334)
log r3.x, r3.x
mul r3.x, r3.x, l(2.400000)
exp r3.x, r3.x
movc r2.w, r2.w, r3.y, r3.x
mul r2.xyz, r2.xyzx, cb1[3].xxxx
ult r3.x, cb1[2].z, l(64)
if_nz r3.x
  sample_l_indexable(texture2d)(float,float,float,float) r3.x, v2.xyxx, t12.xyzw, s1, l(0.000000)
  ne r3.y, l(0.000000, 0.000000, 0.000000, 0.000000), cb3[37].x
  if_z r3.y
    ftoi r3.yw, v0.xxxy
    iadd r0.x, r0.x, cb3[37].z
    imul null, r0.x, r0.x, l(4099)
    and r0.x, r0.x, l(63)
    iadd r3.yw, r0.xxxx, r3.yyyw
    utof r3.yw, r3.yyyw
    mul r3.yw, r3.yyyw, l(0.000000, 0.0671105608, 0.000000, 0.00583714992)
    add r0.x, r3.w, r3.y
    frc r0.x, r0.x
    mul r0.x, r0.x, l(52.982918)
    frc r0.x, r0.x
  else
    mov r0.x, l(0)
  endif
  ge r0.x, cb1[3].z, r0.x
  ftou r4.xy, v0.xyxx
  mov r4.zw, l(0,0,0,0)
  ld_indexable(texture2d)(float,float,float,float) r3.y, r4.xyzw, t0.yxzw
  add r3.y, r3.y, -v0.w
  ge r3.y, l(0.000005), |r3.y|
  and r0.x, r0.x, r3.y
  lt r3.y, cb4[2].y, r3.x
  and r0.x, r0.x, r3.y
  lt r3.y, r3.x, cb4[2].x
  and r0.x, r0.x, r3.y
  if_nz r0.x
    imm_atomic_iadd r4.x, u9, cb1[2].z, l(1)
    ult r0.x, r4.x, cb1[2].y
    if_nz r0.x
      ftou r3.yw, v0.xxxy
      add r0.x, r3.x, -cb4[2].y
      mul_sat r0.x, r0.x, l(1.#INF0000)
      add r0.x, -r0.x, l(1.000000)
      mul r0.x, r0.x, l(255.000000)
      ftou r0.x, r0.x
      iadd r3.x, r4.x, cb1[2].x
      ishl r4.x, r3.x, l(1)
      bfi r3.y, l(16), l(16), r3.y, r3.w
      store_uav_typed u8.xyzw, r4.xxxx, r0.xxxx
      bfi r0.x, l(31), l(1), r3.x, l(1)
      store_uav_typed u8.xyzw, r0.xxxx, r3.yyyy
    endif
  endif
endif
and r0.x, l(8), cb1[0].y
max r3.x, r2.z, r2.y
max r3.x, r2.x, r3.x
lt r3.x, l(0.0000153787005), r3.x
ftou r3.yw, v0.xxxy
sqrt r4.xw, r0.wwww
sqrt r4.y, r1.w
sqrt r4.z, r2.w
mul r5.xyz, r4.xywx, l(0.250000, 0.500000, -0.250000, 0.000000)
add r4.xy, r5.yyyy, r5.xzxx
mad r5.x, r4.z, l(0.250000), r4.x
dp2 r5.y, r4.wzww, l(0.500000, -0.500000, 0.000000, 0.000000)
mad r5.z, r4.z, l(-0.250000), r4.y
and r3.yw, r3.yyyw, l(0, 1, 0, 1)
ine r0.w, r3.w, r3.y
movc r3.yw, r0.wwww, r5.xxxy, r5.xxxz
add o0.xy, r3.ywyy, l(0.000000, 0.498039216, 0.000000, 0.000000)
mul r0.w, r3.z, l(6.250000)
sqrt o0.w, r0.w
mad o1.xyz, r1.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000), l(0.500000, 0.500000, 0.500000, 0.000000)
movc r0.x, r0.x, l(1), l(0)
and r0.w, r3.x, l(2)
iadd r0.x, r0.w, r0.x
iadd r0.x, r0.x, l(24)
utof r0.x, r0.x
mul o2.w, r0.x, l(0.00392156886)
and o3.xyz, r2.xyzx, r3.xxxx
max r0.x, |v7.z|, l(0.000001)

mov r37.xyz, v7.xyzx
ld_indexable(texture2d)(float,float,float,float) r41.xyzw, l(2, 0, 0, 0), t125.xyzw
ge r42.x, r41.x, l(5.0)
if_z r42.x
add r40.w, r37.z, -r41.y
mad r37.x, r41.x, r40.w, r37.x
else
add r40.w, r37.z, -r40.y
mad r37.x, r40.x, r40.w, r37.x
endif

div r0.xw, r37.xxxy, r0.xxxx
add o4.xy, -r0.xwxx, r0.yzyy
mov o0.z, l(0)
mov o1.w, l(1.00000024)
mov o2.xy, l(1.000000,0,0,0)
mov o3.w, l(0)
ret
// Approximately 172 instruction slots used
