//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:47 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
// ------------------------------ ---------- ------- ----------- ---- --------
// 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   xyz
// VERT_ID                  0   x           1     NONE    uint
// NORMAL                   0   xyz         2     NONE   float   xyz
// TANGENT                  0   xyz         3     NONE   float
// BINORMAL                 0   xyz         4     NONE   float
// TEXCOORD                 5   xyzw        5     NONE   float   x
// TEXCOORD                 7   xyz         6     NONE   float   xyz
// 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
// SV_Depth                 0    N/A   oDepth    DEPTH   float    YES
//
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb1[4], immediateIndexed
dcl_constantbuffer cb3[38], immediateIndexed
dcl_input_ps_siv linear noperspective v0.xyz, position
dcl_input_ps linear v2.xyz
dcl_input_ps linear v5.x
dcl_input_ps linear v6.xyz
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_output oDepth
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

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)
add r1.xyz, -v6.xyzx, cb3[29].xyzx
dp3 r0.z, r1.xyzx, r1.xyzx
rsq r0.w, r0.z
mul r1.xyz, r0.wwww, r1.xyzx
movc r2.xyz, v8.xxxx, v2.xyzx, -v2.xyzx
dp3 r1.w, r2.xyzx, r2.xyzx
rsq r1.w, r1.w
mul r2.xyz, r1.wwww, r2.xyzx
mad r0.z, -r0.z, r0.w, l(2.000000)
mul r0.z, r0.z, l(0.500000)
max r0.z, r0.z, l(0.000000)
mad r0.z, v5.x, r0.z, l(-0.00392156979)
mul_sat r0.z, r0.z, l(2.54999924)
lt r0.w, l(0.000000), r0.z
if_nz r0.w
  mad r3.xyzw, r0.zzzz, l(0.849999964, -0.196078181, -0.164706051, -3.000000), l(0.050000, 0.999999940, 0.999999940, 4.000000)
  mov r4.xyz, r3.wwww
else
  mov r4.xyz, l(4.000000,4.000000,4.000000,0)
  mov r3.xyz, l(0.050000,0.999999940,0.999999940,0)
endif
ne r0.z, l(0.000000, 0.000000, 0.000000, 0.000000), cb3[36].z
deriv_rtx_fine r5.xyz, r2.xyzx
deriv_rty_fine r6.xyz, r2.xyzx
dp3 r0.w, r5.xyzx, r5.xyzx
dp3 r1.w, r6.xyzx, r6.xyzx
add r0.w, r0.w, r1.w
min r0.w, r0.w, l(0.300000)
movc r0.z, r0.z, l(0), r0.w
add r0.w, -r3.x, l(1.000000)
mul r0.w, r0.w, r0.w
mad r0.z, r0.w, r0.w, r0.z
sqrt r0.z, r0.z
min r0.z, r0.z, l(1.000000)
sqrt r0.z, r0.z
add o2.z, -r0.z, l(1.000000)
add r3.xyzw, r3.yzyy, l(0.055000, 0.055000, 0.055000, 0.055000)
mul r3.xyzw, r3.xyzw, l(0.947867334, 0.947867334, 0.947867334, 0.947867334)
log r3.xyzw, r3.xyzw
mul r3.xyzw, r3.xyzw, l(2.400000, 2.400000, 2.400000, 2.400000)
exp r3.xyzw, r3.xyzw
exp r0.z, cb3[37].w
mul r4.xyz, r0.zzzz, r4.xyzx
mul r4.xyz, r4.xyzx, cb1[3].xxxx
ftoi r0.zw, v0.xxxy
ine r1.w, l(0), cb3[36].x
ne r2.w, l(0.000000, 0.000000, 0.000000, 0.000000), cb3[37].x
or r1.w, r1.w, r2.w
imul null, r2.w, l(4099), cb3[37].z
and r2.w, r2.w, l(63)
iadd r0.zw, r0.zzzw, r2.wwww
utof r0.zw, r0.zzzw
mul r0.zw, r0.zzzw, l(0.000000, 0.000000, 0.0671105608, 0.00583714992)
add r0.z, r0.w, r0.z
frc r0.z, r0.z
mul r0.z, r0.z, l(52.982918)
frc r0.z, r0.z
mul r0.z, r0.z, l(0.100000)
mad r5.xyz, -r1.xyzx, r0.zzzz, v6.xyzx
mov r5.w, l(1.000000)
dp4 r0.z, r5.xyzw, cb3[18].xyzw
dp4 r0.w, r5.xyzw, cb3[19].xyzw
div r0.z, r0.z, r0.w
min r0.z, r0.z, v0.z
movc oDepth, r1.w, v0.z, r0.z
and r0.z, l(8), cb1[0].y
max r0.w, r4.z, r4.y
max r0.w, r0.w, r4.x
lt r0.w, l(0.0000153787005), r0.w
ftou r1.xy, v0.xyxx
sqrt r3.xyzw, r3.xyzw
mul r3.xyw, r3.xyxw, l(0.250000, 0.500000, 0.000000, -0.250000)
add r1.zw, r3.yyyy, r3.xxxw
mad r3.z, r3.z, l(0.500000), l(-0.500000)
add r3.xy, r1.zwzz, l(0.250000, -0.250000, 0.000000, 0.000000)
and r1.xy, r1.xyxx, l(1, 1, 0, 0)
ine r1.x, r1.y, r1.x
movc r1.xy, r1.xxxx, r3.xzxx, r3.xyxx
add o0.xy, r1.xyxx, l(0.000000, 0.498039216, 0.000000, 0.000000)
mad o1.xyz, r2.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000), l(0.500000, 0.500000, 0.500000, 0.000000)
movc r0.z, r0.z, l(1), l(0)
and r1.x, r0.w, l(2)
iadd r0.z, r0.z, r1.x
iadd r0.z, r0.z, l(24)
utof r0.z, r0.z
mul o2.w, r0.z, l(0.00392156886)
and o3.xyz, r4.xyzx, r0.wwww
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
mov o0.zw, l(0,0,0,0.512347519)
mov o1.w, l(1.00000024)
mov o2.xy, l(1.000000,0,0,0)
mov o3.w, l(0)
ret
// Approximately 97 instruction slots used
