//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:14 2022
//
//
// 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
//
// }
//
//
// 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__materialData.layer_0__diffuse    texture  float4          2d   11        1
// resourceTables__materialData.layer_0__normal    texture  float4          2d   12        1
// resourceTables__materialData.layer_0__gloss    texture  float4          2d   13        1
// resourceTables__materialData.layer_0__ao    texture  float4          2d   14        1
// resourceTables__materialData.layer_0__opacity    texture  float4          2d   15        1
// resourceTables__materialData.layer_0__scatter    texture  float4          2d   16        1
// ConstBuf__modelData               cbuffer      NA          NA    1        1
// ConstBuf__viewData                cbuffer      NA          NA    3        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   float   xy
// 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      w
// TEXCOORD                 8   xyz         7     NONE   float   xyz
//
//
// 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[1], immediateIndexed
dcl_constantbuffer cb3[37], immediateIndexed
dcl_sampler s1, mode_default
dcl_sampler s2, mode_default
dcl_resource_texture2d (float,float,float,float) t11
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_resource_texture2d (float,float,float,float) t15
dcl_resource_texture2d (float,float,float,float) t16
dcl_input_ps_siv linear noperspective v0.xy, 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.w
dcl_input_ps linear v7.xyz
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

ftou r0.xy, v0.xyxx
and r0.xy, r0.xyxx, l(1, 1, 0, 0)
ine r0.x, r0.y, r0.x
sample_indexable(texture2d)(float,float,float,float) r1.xyzw, v2.xyxx, t11.wxyz, s2
log r2.xyzw, r1.yzwy
mul r2.xyzw, r2.xyzw, l(0.416666657, 0.416666657, 0.416666657, 0.416666657)
exp r2.xyzw, r2.xyzw
mad r2.xyzw, r2.xyzw, l(1.055000, 1.055000, 1.055000, 1.055000), l(-0.055000, -0.055000, -0.055000, -0.055000)
lt r3.xyzw, r1.yzwy, l(0.00313080009, 0.00313080009, 0.00313080009, 0.00313080009)
mul r4.xyzw, r1.yzwy, l(12.920000, 12.920000, 12.920000, 12.920000)
mov_sat r1.x, r1.x
movc r2.xyzw, r3.xyzw, r4.xyzw, r2.xyzw
mul r2.xyzw, r2.xyzw, l(0.999999940, 0.999999940, 0.999999940, 0.999999940)
log r2.xyzw, r2.xyzw
dp3 r0.y, v4.xyzx, v4.xyzx
rsq r0.y, r0.y
mul r3.xyzw, r0.yyyy, v4.yxyz
dp3 r0.y, v5.xyzx, v5.xyzx
rsq r0.y, r0.y
mul r4.xyzw, r0.yyyy, v5.yxyz
sample_indexable(texture2d)(float,float,float,float) r0.yzw, v2.xyxx, t12.wxyz, s2
mad r0.yzw, r0.yyzw, l(0.000000, 2.007874, 2.007874, 2.007874), l(0.000000, -1.007874, -1.007874, -1.007874)
dp3 r1.y, r0.yzwy, r0.yzwy
sqrt r1.y, r1.y
max r1.y, r1.y, l(0.000010)
rcp r1.z, r1.y
mul r0.yzw, r0.yyzw, r1.zzzz
dp3 r1.z, r0.yzwy, r0.yzwy
rsq r1.z, r1.z
mul r0.yzw, r0.yyzw, r1.zzzz
mul r4.xyzw, r4.xyzw, r0.zzzz
mad r3.xyzw, r0.yyyy, r3.xyzw, r4.xyzw
dp3 r0.y, v3.xyzx, v3.xyzx
rsq r0.y, r0.y
mul r4.xyz, r0.yyyy, v3.xyzx
mad r3.xyzw, r0.wwww, r4.yxyz, r3.xyzw
dp3 r0.y, r3.yzwy, r3.yzwy
rsq r0.y, r0.y
mul r3.xyzw, r0.yyyy, r3.xyzw
mad r0.y, r3.x, l(0.500000), l(0.227457017)
mad o1.xyz, r3.yzwy, l(0.500000, 0.500000, 0.500000, 0.000000), l(0.500000, 0.500000, 0.500000, 0.000000)
mul_sat r0.y, r0.y, l(1.36533308)
mad r0.z, -r0.y, v6.w, l(1.000000)
mul r0.y, r0.y, v6.w
add r0.z, r0.z, r0.z
sample_indexable(texture2d)(float,float,float,float) r0.w, v2.xyxx, t15.xyzw, s2
mad r1.z, -r1.x, r0.w, l(1.000000)
mul r0.w, r0.w, r1.x
dp2 r0.w, r0.wwww, r0.yyyy
lt r0.y, r0.y, l(0.500000)
mad r0.z, -r0.z, r1.z, l(1.000000)
movc r0.y, r0.y, r0.w, r0.z
add r0.y, r0.y, l(-0.615967)
mul_sat r0.y, r0.y, l(2.719786)
add r1.xzw, r0.yyyy, l(-0.200000, 0.000000, -0.300000, -0.250000)
mul r1.xzw, r1.zzwx, l(1.47058821, 0.000000, 4.000000, 1.250000)
max r0.z, r1.w, l(0.000000)
mov_sat r1.xz, r1.xxzx
sample_indexable(texture2d)(float,float,float,float) r3.xyz, v2.xyxx, t13.xzwy, s2
add r5.xyzw, -r3.yxyx, l(1.500000, 0.500000, 1.000000, 0.990000)
mul_sat r0.w, r5.y, l(2.500000)
mul r0.z, r0.w, r0.z
mad r0.z, r0.z, l(0.829028428), l(1.000000)
mul r2.xyzw, r2.xyzw, r0.zzzz
exp r2.xyzw, r2.xyzw
add r6.xyzw, r2.xyzw, l(0.055000, 0.055000, 0.055000, 0.055000)
mul r6.xyzw, r6.xyzw, l(0.947867334, 0.947867334, 0.947867334, 0.947867334)
log r6.xyzw, r6.xyzw
mul r6.xyzw, r6.xyzw, l(2.400000, 2.400000, 2.400000, 2.400000)
exp r6.xyzw, r6.xyzw
lt r7.xyzw, r2.wyzw, l(0.040450, 0.040450, 0.040450, 0.040450)
mul r2.xyzw, r2.wyzw, l(0.0773993805, 0.0773993805, 0.0773993805, 0.0773993805)
movc r2.xyzw, r7.xyzw, r2.xyzw, r6.xyzw
sqrt r2.xyzw, r2.xyzw
mul r6.xyz, r2.xywx, l(0.250000, 0.500000, -0.250000, 0.000000)
add r0.zw, r6.yyyy, r6.xxxz
mad r6.x, r2.z, l(0.250000), r0.z
mad r6.z, r2.z, l(-0.250000), r0.w
dp2 r6.y, r2.wzww, l(0.500000, -0.500000, 0.000000, 0.000000)
movc r0.xz, r0.xxxx, r6.xxyx, r6.xxzx
add o0.xy, r0.xzxx, l(0.000000, 0.498039216, 0.000000, 0.000000)
mov_sat r5.x, r5.x
mul r0.x, r1.z, r5.x
mul r0.z, r1.x, r5.z
mad r0.w, r0.z, r5.w, r3.x
max r0.z, r0.z, l(0.000000)
add r0.w, -r0.w, l(1.000000)
mul r0.w, r0.w, r0.w
mul r1.x, r3.z, r3.z
mul r1.z, r1.x, l(0.160000)
mad r1.x, -r1.x, l(0.160000), l(0.020000)
mad r0.x, r0.x, r1.x, r1.z
mul r0.x, r0.x, l(6.250000)
sqrt o0.w, r0.x
mov o0.z, l(0)
deriv_rtx_fine r1.xzw, r4.xxyz
deriv_rty_fine r2.xyz, r4.xyzx
dp3 r0.x, r2.xyzx, r2.xyzx
dp3 r1.x, r1.xzwx, r1.xzwx
add r0.x, r0.x, r1.x
min r2.y, r0.x, l(0.300000)
add r0.x, -r1.y, l(1.000000)
mad r2.x, r0.z, r0.x, r1.y
ne r0.x, l(0.000000, 0.000000, 0.000000, 0.000000), cb3[36].z
movc r0.xz, r0.xxxx, l(1.000000,0,0,0), r2.xxyx
add r1.x, r0.x, l(-0.950000)
mul o1.w, r1.x, l(20.000000)
sample_indexable(texture2d)(float,float,float,float) r1.x, v2.xyxx, t14.xyzw, s2
add r1.y, -r1.x, l(1.000000)
mad o2.x, r0.y, r1.y, r1.x
max r0.x, r0.x, l(0.600000)
mad r0.x, r0.x, l(-0.527635), l(0.520718)
max r0.x, r0.x, l(0.000000)
mad r0.x, r0.w, r0.w, r0.x
add r0.x, r0.z, r0.x
sqrt r0.x, r0.x
min r0.x, r0.x, l(1.000000)
max r0.x, r0.x, l(0.001000)
sqrt r0.x, r0.x
add o2.z, -r0.x, l(1.000000)
sample_indexable(texture2d)(float,float,float,float) r0.xyz, v2.xyxx, t16.xyzw, s1
mul r0.xyz, r0.xyzx, r3.yyyy
max r0.w, r0.z, r0.y
max r0.w, r0.w, r0.x
mul r0.w, r3.y, r0.w
mov o2.y, r3.y
lt r0.w, l(0.010000), r0.w
and r1.x, l(8), cb1[0].y
movc r1.x, r1.x, l(25), l(24)
bfi r1.x, l(3), l(5), r0.w, r1.x
and o3.xyz, r0.xyzx, r0.wwww
utof r0.x, r1.x
mul o2.w, r0.x, l(0.00392156886)
mov o3.w, l(0)
mul r0.xy, v0.xyxx, cb3[32].zwzz
mad r0.xy, r0.xyxx, l(2.000000, -2.000000, 0.000000, 0.000000), l(-1.000000, 1.000000, 0.000000, 0.000000)
max r0.z, |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.zw, r37.xxxy, r0.zzzz
add o4.xy, -r0.zwzz, r0.xyxx
ret
// Approximately 140 instruction slots used
