// AUTOMATICALLY CONVERTED FROM SHADER FIXES 
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v0.6.89 on Sat Dec  3 23:58:27 2022
//
//
// 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
// TANGENT                  0   xyz         4     NONE   float
// BINORMAL                 0   xyz         5     NONE   float
// TEXCOORD                 8   xyz         6     NONE   float   xyz
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target                0   xyzw        0   TARGET   float   xyzw
// SV_Target                1   xy          1   TARGET   float   xy
//
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer CB1[4], immediateIndexed
dcl_constantbuffer CB2[36], immediateIndexed
dcl_constantbuffer CB3[1], immediateIndexed
dcl_sampler s1, mode_default
dcl_sampler s2, mode_default
dcl_resource_texture2d (float,float,float,float) t10
dcl_resource_texture2d (float,float,float,float) t11
dcl_resource_texture2d (float,float,float,float) t12
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 v6.xyz
dcl_output o0.xyzw
dcl_output o1.xy
dcl_temps 50
dcl_resource_buffer (float,float,float,float) t125
ld_indexable(buffer)(float,float,float,float) r40.xyzw, l(0, 0, 0, 0), t125.xyzw
mul r0.xy, v0.xyxx, cb2[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)
sample_indexable(texture2d)(float,float,float,float) r0.zw, v2.xyxx, t10.zwxy, s1
mad r0.zw, r0.zzzw, l(0.000000, 0.000000, 2.000000, 2.000000), l(0.000000, 0.000000, -0.996078432, -0.996078432)
mul r1.xy, l(12.500000, 16.666668, 0.000000, 0.000000), cb2[35].xxxx
frc r1.xy, r1.xyxx
add r1.zw, r1.xxxy, l(0.000000, 0.000000, -0.500000, -0.500000)
add r2.xy, l(0.040000, 0.030000, 0.000000, 0.000000), cb2[35].xxxx
mul r2.xy, r2.xyxx, l(12.500000, 16.666668, 0.000000, 0.000000)
frc r2.xy, r2.xyxx
add r2.xy, r2.xyxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
mul r2.xy, r2.xyxx, l(0.150000, 0.180000, 0.000000, 0.000000)
mul r1.xyzw, r1.xyzw, l(6.28318548, 6.28318548, 0.150000, 0.180000)
sincos null, r1.xy, r1.xyxx
sample_indexable(texture2d)(float,float,float,float) r2.zw, v2.xyxx, t11.zwxy, s1
mad r2.zw, r2.zzzw, l(0.000000, 0.000000, 2.000000, 2.000000), l(0.000000, 0.000000, -0.996078432, -0.996078432)
mad r1.xy, r1.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000), l(0.500000, 0.500000, 0.000000, 0.000000)
mad r3.xy, r2.zwzz, r1.wwww, v2.xyxx
mad r2.yz, r2.zzwz, r2.yyyy, v2.xxyx
mad r1.zw, r0.zzzw, r1.zzzz, v2.xxxy
mad r0.zw, r0.zzzw, r2.xxxx, v2.xxxy
sample_indexable(texture2d)(float,float,float,float) r3.xyz, r3.xyxx, t12.xyzw, s1
sample_indexable(texture2d)(float,float,float,float) r2.xyz, r2.yzyy, t12.xyzw, s1
add r2.xyz, -r3.xyzx, r2.xyzx
mad r2.xyz, r1.yyyy, r2.xyzx, r3.xyzx
mul r3.xyz, r2.xyzx, cb3[0].xxxx
sample_indexable(texture2d)(float,float,float,float) r1.y, r1.zwzz, t16.xwyz, s2
sample_indexable(texture2d)(float,float,float,float) r2.w, r0.zwzz, t16.xyzw, s2
add r2.w, -r1.y, r2.w
mad r1.y, r1.x, r2.w, r1.y
mul_sat r1.y, r1.y, l(1.27499962)
lt r2.w, l(0.000000), r1.y
if_nz r2.w
  sample_indexable(texture2d)(float,float,float,float) r4.xyz, r1.zwzz, t12.xyzw, s1
  sample_indexable(texture2d)(float,float,float,float) r5.xyz, r0.zwzz, t12.xyzw, s1
  add r5.xyz, -r4.xyzx, r5.xyzx
  mad r1.xzw, r1.xxxx, r5.xxyz, r4.xxyz
  mad r1.xzw, -r2.xxyz, cb3[0].xxxx, r1.xxzw
  mad r3.xyz, r1.yyyy, r1.xzwx, r3.xyzx
endif
mul o0.xyz, r3.xyzx, cb1[3].xxxx
max r0.z, |v6.z|, l(0.000001)
mov r37.xyz, v6.xyzx
ld_indexable(buffer)(float,float,float,float) r41.xyzw, l(2, 0, 0, 0), t125.xyzw
ge r42.x, r41.x, l(5.000000)
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 o1.xy, -r0.zwzz, r0.xyxx
mov o0.w, l(-1000000.000000)
ret
// Approximately 0 instruction slots used
