//TAA objects PS manual. Black spirit.
//
// Generated by Microsoft (R) HLSL Shader Compiler 10.0.10011.16384
//
//   using 3Dmigoto v1.3.16 on Thu Jan 27 23:44:00 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
                                        // Textures:  t2-t7
//
// }
//
// 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
//       float3 crt_cutout_emissive_matU;// Index:    2
//       float3 crt_cutout_emissive_matV;// Index:    3
//       float3 base_emissive_matU;     // Index:    4
//       float3 base_emissive_matV;     // Index:    5
//       float3 glow_inner_emissive_matU;// Index:    6
//       float3 glow_inner_emissive_matV;// Index:    7
//       float material_cst_VertexOffsetScale;// Index:    7.w
//       float material_cst_VertexExtraOffset;// Index:    8
//
//   } resourceTables__materialData;    // Index:    0-8.x            Components:    33
                                        // Textures:  t11-t21
//
// }
//
// Resource bind info for resourceTables__modelData.customRTs
// {
//
//   struct CustomRTTransform
//   {
//
//       float4x4 ws2ts;                // Index:    0
//
//   } $Element;                        // Index:    0 1 2 3          Components:    16
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// resourceTables__viewData__smpLinear    sampler      NA          NA    1        1
// resourceTables__viewData__smpLinearClamp    sampler      NA          NA    5        1
// resourceTables__modelData.customRTs    texture  struct         r/o    7        1
// resourceTables__viewData.blueNoiseTexture    texture   float     2darray    8        1
// resourceTables__materialData.material_dudv1    texture  float4          2d   12        1
// resourceTables__materialData.material_dudv2    texture  float4          2d   13        1
// resourceTables__materialData.material_dudv3    texture  float4          2d   14        1
// resourceTables__materialData.layer_0__emissive    texture  float4          2d   16        1
// resourceTables__materialData.crt_cutout_emissive    texture  float4          2d   17        1
// resourceTables__materialData.crt_cutout_alpha    texture  float4          2d   18        1
// resourceTables__materialData.base_emissive    texture  float4          2d   19        1
// resourceTables__materialData.glow_inner_emissive    texture  float4          2d   20        1
// resourceTables__materialData.glow_inner_alpha    texture  float4          2d   21        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   xyz
// 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   xyz
// BINORMAL                 0   xyz         5     NONE   float   xyz
// 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_constantbuffer cb4[8], immediateIndexed
dcl_sampler s1, mode_default
dcl_sampler s5, mode_default
dcl_resource_structured t7, 64
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_resource_texture2d (float,float,float,float) t16
dcl_resource_texture2d (float,float,float,float) t17
dcl_resource_texture2d (float,float,float,float) t18
dcl_resource_texture2d (float,float,float,float) t19
dcl_resource_texture2d (float,float,float,float) t20
dcl_resource_texture2d (float,float,float,float) t21
dcl_input_ps_siv linear noperspective v0.xyz, position
dcl_input_ps constant v1.x
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.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
ne r0.x, l(1.000000), cb1[2].w
if_nz r0.x
  ne r0.x, l(0.000000, 0.000000, 0.000000, 0.000000), cb3[37].x
  if_z r0.x
    and r0.x, v1.x, l(0x00ffffff)
    ftoi r0.yz, v0.xxyx
    iadd r0.x, r0.x, l(1)
    and r0.x, r0.x, l(7)
    imad r0.xy, r0.xxxx, l(7, 7, 0, 0), r0.yzyy
    and r0.xy, r0.xyxx, l(63, 63, 0, 0)
    and r0.z, l(7), cb3[37].z
    mov r0.w, l(0)
    ld_indexable(texture2darray)(float,float,float,float) r0.x, r0.xyzw, t8.xyzw
  else
    mov r0.x, l(0)
  endif
  ge r0.x, r0.x, cb1[2].w
  discard_nz r0.x
endif
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.z, r0.z
mul r1.xyz, r0.zzzz, r1.xyzx
movc r2.xyz, v8.xxxx, v3.xyzx, -v3.xyzx

dp3 r0.z, r2.xyzx, r2.xyzx
rsq r0.z, r0.z
mul r2.xyz, r0.zzzz, r2.xyzx
ld_structured_indexable(structured_buffer, stride=64)(mixed,mixed,mixed,mixed) r3.xyzw, l(0), l(0), t7.xyzw
ld_structured_indexable(structured_buffer, stride=64)(mixed,mixed,mixed,mixed) r4.xyzw, l(0), l(16), t7.xyzw
ld_structured_indexable(structured_buffer, stride=64)(mixed,mixed,mixed,mixed) r5.xyzw, l(0), l(48), t7.xyzw

//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
mul r41.xyz, r41.xyzx, l(0.5)
//mul r41.xyz, r41.xyzx, cb0[0].x
//mul r41.xyz, r41.xyzx, l(-0.5)
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.z, r1.xyzx, r2.xyzx
max r0.w, r0.z, l(0.000100)
div r6.xyz, r1.xyzx, r0.wwww

mad r6.x, r40.x, r41.x, r6.x
mad r6.y, r40.x, r41.y, r6.y
mad r6.z, r40.x, r41.z, r6.z

//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

deriv_rtx_fine r7.xy, v2.xyxx
deriv_rty_fine r7.zw, v2.yyyx
deriv_rtx_fine r8.xyz, v6.zxyz
deriv_rty_fine r9.xyz, v6.yzxy
mul r0.w, r7.w, r7.y
mad r0.w, r7.x, r7.z, -r0.w
mul r7.xyz, r8.xyzx, r9.xyzx
mad r7.xyz, r8.zxyz, r9.yzxy, -r7.xyzx
dp3 r1.w, r7.xyzx, r7.xyzx
sqrt r1.w, r1.w
lt r2.w, l(0.000000), r1.w
div r0.w, |r0.w|, r1.w
sqrt r0.w, r0.w
and r0.w, r0.w, r2.w
mul r7.xy, v2.xyxx, l(30.000000, 30.000000, 0.000000, 0.000000)
mov r8.xyz, v6.xyzx
mov r8.w, l(1.000000)
dp4 r3.x, r8.xyzw, r3.xyzw
dp4 r3.y, r8.xyzw, r4.xyzw
dp4 r1.w, r8.xyzw, r5.xyzw
div r3.xy, r3.xyxx, r1.wwww
sample_indexable(texture2d)(float,float,float,float) r4.xyz, r7.xyxx, t16.xyzw, s1
mul r4.xyz, r4.xyzx, l(67.954300, 86.315697, 100.000000, 0.000000)
sample_indexable(texture2d)(float,float,float,float) r1.w, r3.xyxx, t18.xywz, s5
dp2 r2.w, r0.xyxx, r0.xyxx
sqrt r2.w, r2.w
min r0.z, |r0.z|, l(1.000000)
add_sat r2.w, -r2.w, l(2.000000)
mul r3.x, r2.w, r2.w
mad r2.w, -r2.w, l(2.000000), l(3.000000)
mul r2.w, r2.w, r3.x
mul r3.x, r0.z, r2.w
mad r1.w, r1.w, r3.x, l(-0.0392156988)
mul_sat r1.w, r1.w, l(21.250011)
lt r3.x, l(0.000000), r1.w
if_nz r3.x
  mul r3.xy, v2.xyxx, l(2.000000, 1.000000, 0.000000, 0.000000)
  sample_indexable(texture2d)(float,float,float,float) r3.xy, r3.xyxx, t12.xyzw, s1
  mad r3.xy, r3.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-0.996078432, -0.996078432, 0.000000, 0.000000)
  mul r3.z, l(3.33333325), cb3[35].x
  frc r3.z, r3.z
  add r3.w, r3.z, l(-0.500000)
  add r4.w, l(0.150000), cb3[35].x
  mul r4.w, r4.w, l(3.33333325)
  frc r4.w, r4.w
  add r4.w, r4.w, l(-0.500000)
  mul r4.w, r4.w, l(0.500000)
  mul r3.zw, r3.zzzw, l(0.000000, 0.000000, 6.28318548, 0.500000)
  sincos null, r3.z, r3.z
  mad r3.z, r3.z, l(0.500000), l(0.500000)
  mul r5.xyz, r6.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000)
  dp3 r5.w, -r5.xyzx, v4.xyzx
  dp3 r5.y, -r5.xyzx, v5.xyzx
  mov r5.x, -r5.w
  mul r5.xy, r0.wwww, r5.xyxx
  mad r5.zw, r3.xxxy, r3.wwww, -r5.xxxy
  mad r3.xy, r3.xyxx, r4.wwww, -r5.xyxx
  add r5.xy, r5.zwzz, v2.xyxx
  mov r5.z, l(1.000000)
  dp3 r7.x, cb4[2].xyzx, r5.xyzx
  dp3 r7.y, cb4[3].xyzx, r5.xyzx
  add r5.xy, r3.xyxx, v2.xyxx
  mov r5.z, l(1.000000)
  dp3 r3.x, cb4[2].xyzx, r5.xyzx
  dp3 r3.y, cb4[3].xyzx, r5.xyzx
  sample_indexable(texture2d)(float,float,float,float) r5.xyz, r7.xyxx, t17.xyzw, s1
  sample_indexable(texture2d)(float,float,float,float) r3.xyw, r3.xyxx, t17.xywz, s1
  add r3.xyw, -r5.xyxz, r3.xyxw
  mad r3.xyz, r3.zzzz, r3.xywx, r5.xyzx
  mad r5.xyz, r1.wwww, l(-0.999999940, -0.353000, -0.042000, 0.000000), l(0.999999940, 0.353000, 0.042000, 0.000000)
  mad r3.xyz, r3.xyzx, l(1.000000, 0.174647, 0.351495, 0.000000), -r4.xyzx
  mad r4.xyz, r1.wwww, r3.xyzx, r4.xyzx
  mov r3.xy, r5.xxxx
else
  mov r3.xy, l(0.999999940,0.999999940,0,0)
  mov r5.xyz, l(0.999999940,0.353000,0.042000,0)
endif
add r3.z, -r0.z, l(1.000000)
mul r3.z, r2.w, r3.z
min r3.z, r3.z, l(1.000000)
lt r3.w, l(0.000000), r3.z
if_nz r3.w
  sample_indexable(texture2d)(float,float,float,float) r7.xy, v2.xyxx, t13.xyzw, s1
  mad r7.xy, r7.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-0.996078432, -0.996078432, 0.000000, 0.000000)
  mul r3.w, l(10.000000), cb3[35].x
  frc r3.w, r3.w
  add r4.w, r3.w, l(-0.500000)
  mul r4.w, r4.w, l(0.500000)
  add r5.w, l(0.050000), cb3[35].x
  mul r5.w, r5.w, l(10.000000)
  frc r5.w, r5.w
  add r5.w, r5.w, l(-0.500000)
  mul r5.w, r5.w, l(0.500000)
  mul r3.w, r3.w, l(6.28318548)
  sincos null, r3.w, r3.w
  mad r3.w, r3.w, l(0.500000), l(0.500000)
  mul r8.xyz, r6.xyzx, l(0.300000, 0.300000, 0.300000, 0.000000)
  dp3 r6.w, -r8.xyzx, v4.xyzx
  dp3 r8.y, -r8.xyzx, v5.xyzx
  mov r8.x, -r6.w
  mul r7.zw, r0.wwww, r8.xxxy
  mad r8.xy, r7.xyxx, r4.wwww, -r7.zwzz
  mad r7.xy, r7.xyxx, r5.wwww, -r7.zwzz
  add r8.xy, r8.xyxx, v2.xyxx
  mov r8.z, l(1.000000)
  dp3 r9.x, cb4[4].xyzx, r8.xyzx
  dp3 r9.y, cb4[5].xyzx, r8.xyzx
  add r7.xy, r7.xyxx, v2.xyxx
  mov r7.z, l(1.000000)
  dp3 r8.x, cb4[4].xyzx, r7.xyzx
  dp3 r8.y, cb4[5].xyzx, r7.xyzx
  sample_indexable(texture2d)(float,float,float,float) r7.xyz, r9.xyxx, t19.xyzw, s1
  sample_indexable(texture2d)(float,float,float,float) r8.xyz, r8.xyxx, t19.xyzw, s1
  add r8.xyz, -r7.xyzx, r8.xyzx
  mad r7.xyz, r3.wwww, r8.xyzx, r7.xyzx
  mul r7.xyz, r3.zzzz, r7.xyzx
  mad r5.y, r3.z, -r5.y, r5.y
  mad r5.z, r3.z, -r5.z, r5.z
  mad r4.xyz, r7.xyzx, l(0.879314, 1.693810, 1.964502, 0.000000), r4.xyzx
endif
sample_indexable(texture2d)(float,float,float,float) r3.z, v2.xyxx, t21.yzxw, s1
log r0.z, r0.z
mul r0.z, r0.z, l(0.200000)
exp r0.z, r0.z
add r0.z, -r0.z, l(1.000000)
mul r0.z, r2.w, r0.z
mul_sat r0.z, r0.z, r3.z
lt r2.w, l(0.000000), r0.z
if_nz r2.w
  mul r3.zw, v2.xxxy, l(0.000000, 0.000000, 6.000000, 6.000000)
  sample_indexable(texture2d)(float,float,float,float) r3.zw, r3.zwzz, t14.zwxy, s1
  mad r3.zw, r3.zzzw, l(0.000000, 0.000000, 2.000000, 2.000000), l(0.000000, 0.000000, -0.996078432, -0.996078432)
  mul r2.w, l(33.333336), cb3[35].x
  frc r2.w, r2.w
  add r4.w, r2.w, l(-0.500000)
  mul r4.w, r4.w, l(0.100000)
  add r5.w, l(0.015000), cb3[35].x
  mul r5.w, r5.w, l(33.333336)
  frc r5.w, r5.w
  add r5.w, r5.w, l(-0.500000)
  mul r5.w, r5.w, l(0.100000)
  mul r2.w, r2.w, l(6.28318548)
  sincos null, r2.w, r2.w
  mad r2.w, r2.w, l(0.500000), l(0.500000)
  dp3 r6.w, -r6.xyzx, v4.xyzx
  dp3 r6.y, -r6.xyzx, v5.xyzx
  mov r6.x, -r6.w
  mul r6.xy, r0.wwww, r6.xyxx
  mad r6.zw, r3.zzzw, r4.wwww, -r6.xxxy
  mad r3.zw, r3.zzzw, r5.wwww, -r6.xxxy
  add r6.xy, r6.zwzz, v2.xyxx
  mov r6.z, l(1.000000)
  dp3 r7.x, cb4[6].xyzx, r6.xyzx
  dp3 r7.y, cb4[7].xyzx, r6.xyzx
  add r6.xy, r3.zwzz, v2.xyxx
  mov r6.z, l(1.000000)
  dp3 r8.x, cb4[6].xyzx, r6.xyzx
  dp3 r8.y, cb4[7].xyzx, r6.xyzx
  sample_indexable(texture2d)(float,float,float,float) r6.xyz, r7.xyxx, t20.xyzw, s1
  sample_indexable(texture2d)(float,float,float,float) r7.xyz, r8.xyxx, t20.xyzw, s1
  add r7.xyz, -r6.xyzx, r7.xyzx
  mad r6.xyz, r2.wwww, r7.xyzx, r6.xyzx
  mul r6.xyz, r0.zzzz, r6.xyzx
  mad r5.y, r0.z, -r5.y, r5.y
  mad r5.z, r0.z, -r5.z, r5.z
  mad r4.xyz, r6.xyzx, l(142.560364, 203.543716, 400.001007, 0.000000), r4.xyzx
endif
ge r0.z, l(0.000000), r1.w
discard_nz r0.z
ne r0.z, l(0.000000, 0.000000, 0.000000, 0.000000), cb3[36].z
deriv_rtx_fine r6.xyz, r2.xyzx
deriv_rty_fine r7.xyz, r2.xyzx
dp3 r0.w, r6.xyzx, r6.xyzx
dp3 r1.w, r7.xyzx, r7.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, -r5.y, 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)
lt r0.z, r3.x, l(0.040450)
mul r0.w, r3.x, l(0.0773993805)
add r1.w, r3.x, 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 r0.z, r0.z, r0.w, r1.w
lt r0.w, r3.y, l(0.040450)
mul r1.w, r3.y, l(0.0773993805)
add r2.w, r3.y, l(0.055000)
mul r2.w, r2.w, l(0.947867334)
log r2.w, r2.w
mul r2.w, r2.w, l(2.400000)
exp r2.w, r2.w
movc r0.w, r0.w, r1.w, r2.w
lt r1.w, r5.x, l(0.040450)
mul r2.w, r5.x, l(0.0773993805)
add r3.x, r5.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 r1.w, r1.w, r2.w, r3.x
exp r2.w, cb3[37].w
mul r3.xyz, r2.wwww, r4.xyzx
mul r3.xyz, r3.xyzx, cb1[3].xxxx
ftoi r4.xy, v0.xyxx
ine r2.w, l(0), cb3[36].x
ne r3.w, l(0.000000, 0.000000, 0.000000, 0.000000), cb3[37].x
or r2.w, r2.w, r3.w
imul null, r3.w, l(4099), cb3[37].z
and r3.w, r3.w, l(63)
iadd r4.xy, r3.wwww, r4.xyxx
utof r4.xy, r4.xyxx
mul r4.xy, r4.xyxx, l(0.0671105608, 0.00583714992, 0.000000, 0.000000)
add r3.w, r4.y, r4.x
frc r3.w, r3.w
mul r3.w, r3.w, l(52.982918)
frc r3.w, r3.w
mul r3.w, r3.w, l(0.500000)
mad r4.xyz, -r1.xyzx, r3.wwww, v6.xyzx
mov r4.w, l(1.000000)



dp4 r1.x, r4.xyzw, cb3[18].xyzw
dp4 r1.y, r4.xyzw, cb3[19].xyzw
div r1.x, r1.x, r1.y
min r1.x, r1.x, v0.z
movc r1.x, r2.w, v0.z, r1.x
and r1.y, l(8), cb1[0].y
max r1.z, r3.z, r3.y
max r1.z, r1.z, r3.x
lt r1.z, l(0.0000153787005), r1.z
ftou r4.xy, v0.xyxx
sqrt r6.xyw, r0.zwzz
sqrt r6.z, r1.w
mul r5.xyw, r6.xyxw, l(0.250000, 0.500000, 0.000000, -0.250000)
add r0.zw, r5.yyyy, r5.xxxw
mad r7.x, r6.z, l(0.250000), r0.z
dp2 r7.y, r6.wzww, l(0.500000, -0.500000, 0.000000, 0.000000)
mad r7.z, r6.z, l(-0.250000), r0.w
and r0.zw, r4.xxxy, l(0, 0, 1, 1)
ine r0.z, r0.w, r0.z
movc r0.zw, r0.zzzz, r7.xxxy, r7.xxxz
add o0.xy, r0.zwzz, l(0.000000, 0.498039216, 0.000000, 0.000000)
mul r0.z, r5.z, l(6.250000)
sqrt o0.w, r0.z
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, r1.y, l(1), l(0)
and r0.w, r1.z, l(2)
iadd r0.z, r0.w, r0.z
iadd r0.z, r0.z, l(24)
utof r0.z, r0.z
mul o2.w, r0.z, l(0.00392156886)
and o3.xyz, r3.xyzx, r1.zzzz
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 r0.xy, -r0.zwzz, r0.xyxx
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)
mov o4.xy, r0.xyxx
mov oDepth, r1.x
ret
// Approximately 303 instruction slots used

///////////////////////////////// HLSL Code /////////////////////////////////
// // ---- Created with 3Dmigoto v1.3.16 on Thu Jan 27 23:44:00 2022
//
// struct CustomRTTransform
// {
//     float4x4 ws2ts;                // Offset:    0
// };
//
// cbuffer ConstBuf__modelData : register(b1)
// {
//
//   struct
//   {
//     uint lightGroupID;
//     uint modelFlags;
//     float lodFade;
//     float displacementBlend;
//     int turbulenceDataIdx;
//     int instanceOffset;
//     int characterFxIdx;
//     uint debugRenderChannel;
//     uint decayWriteOffset;
//     uint decayWriteMaxCount;
//     uint decayAtomicCounterIndex;
//     float modelAlpha;
//     float emissiveScale;
//     float desaturationScale;
//     float decayCoverageEstimation;
//     float3 quantScale;
//     float3 quantBias;
//   } resourceTables__modelData : packoffset(c0);
//
//
// SamplerState resourceTables__viewData__smpLinear_s : register(s1);
// SamplerState resourceTables__viewData__smpLinearClamp_s : register(s5);
// StructuredBuffer<CustomRTTransform> resourceTables__modelData.customRTs : register(t7);
// Texture2DArray<float> resourceTables__viewData.blueNoiseTexture : register(t8);
// Texture2D<float4> resourceTables__materialData.material_dudv1 : register(t12);
// Texture2D<float4> resourceTables__materialData.material_dudv2 : register(t13);
// Texture2D<float4> resourceTables__materialData.material_dudv3 : register(t14);
// Texture2D<float4> resourceTables__materialData.layer_0__emissive : register(t16);
// Texture2D<float4> resourceTables__materialData.crt_cutout_emissive : register(t17);
// Texture2D<float4> resourceTables__materialData.crt_cutout_alpha : register(t18);
// Texture2D<float4> resourceTables__materialData.base_emissive : register(t19);
// Texture2D<float4> resourceTables__materialData.glow_inner_emissive : register(t20);
// Texture2D<float4> resourceTables__materialData.glow_inner_alpha : register(t21);
//
//
// // 3Dmigoto declarations
// #define cmp -
// Texture1D<float4> IniParams : register(t120);
// Texture2D<float4> StereoParams : register(t125);
//
//
// void main(
//   float4 v0 : SV_POSITION0,
//   nointerpolation uint v1 : VERT_ID0,
//   float2 v2 : TEXCOORD0,
//   float3 v3 : NORMAL0,
//   float3 v4 : TANGENT0,
//   float3 v5 : BINORMAL0,
//   float4 v6 : TEXCOORD7,
//   float3 v7 : TEXCOORD8,
//   uint v8 : SV_IsFrontFace0,
//   out float4 o0 : SV_Target0,
//   out float4 o1 : SV_Target1,
//   out float4 o2 : SV_Target2,
//   out float4 o3 : SV_Target3,
//   out float2 o4 : SV_Target4,
//   out float oDepth : SV_Depth)
// {
//   Textures: = cmp(t2-t7 != );
//   if (Texture: != 0) {
//     Textures: = cmp(t11-t21 != );
//   float4 r0,r1,r2,r3,r4,r5,r6,r7,r8,r9;
//   uint4 bitmask, uiDest;
//   float4 fDest;
//
//     if (r0.x == 0) {
//       r0.x =  & ;
//       r0.x = 0;
//       r0.x =  + ;
//       r0.x = (int)v1.x & 0x00ffffff;
//       r0.yz = mad((int2)v0.xy, , );
//       r0.x = (int)r0.x & 1;
//       r0.x = (int)r0.x & 7;
//       r0.xy = 0;
//       r0.xy = .Load(r0.xyxx)(null);
//     } else {
//       r0.w = 0;
//     }
//      = cmp( >= );
//     if (r0.x != 0) discard;
//   }
//   r0.x = resourceTables__modelData.modelAlpha * r0.x;
//   r0.x =  *  + ;
// }
//////////////////////////////// HLSL Errors ////////////////////////////////
// error X3506: unrecognized compiler target '                                        // Textures:  t2-t7'
/////////////////////////////////////////////////////////////////////////////
