// MANUALLY DUMPED [ShaderRegexLightingPS1nospec] Screen space reflections.
//
// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384
//
//   using 3Dmigoto v1.3.16 on Wed Oct  6 23:21:05 2021
//
//
// Buffer Definitions:
//
// cbuffer fblock
// {
//
//   float4 renderpositiontoviewtexture;// Index:    0.xyzw           Components:     4
//   float4 lightprepassinverseparams;  // Index:    1.xyzw           Components:     4
//   float4 prevviewposition;           // Index:    2.xyzw           Components:     4
//   float4 prevviewprojectionmatrixrcx;// Index:    3.xyzw           Components:     4
//   float4 prevviewprojectionmatrixrcy;// Index:    4.xyzw           Components:     4
//   float4 prevviewprojectionmatrixrcw;// Index:    5.xyzw           Components:     4
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// viewstencil_samp_state            sampler      NA          NA    0        1
// viewdepthmap_samp_state           sampler      NA          NA    1        1
// tex3_samp_state                   sampler      NA          NA    2        1
// tex0_samp_state                   sampler      NA          NA    3        1
// tex1_samp_state                   sampler      NA          NA    4        1
// tex5_samp_state                   sampler      NA          NA    5        1
// tex6_samp_state                   sampler      NA          NA    6        1
// viewstencil_samp                  texture  float4          2d    0        1
// viewdepthmap_samp                 texture  float4          2d    1        1
// tex3_samp                         texture  float4          2d    2        1
// tex0_samp                         texture  float4          2d    3        1
// tex1_samp                         texture  float4          2d    4        1
// tex5_samp                         texture  float4          2d    5        1
// tex6_samp                         texture  float4          2d    6        1
// fblock                            cbuffer      NA          NA    0        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// TEXCOORD                 1   xyzw        0     NONE   float   xyzw
// TEXCOORD                 2   xyzw        1     NONE   float   xyzw
// SV_Position              0   xyzw        2      POS   float   xy
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target                0   xyzw        0   TARGET   float   xyzw
//
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[6], immediateIndexed
dcl_sampler s0, mode_default
dcl_sampler s1, mode_default
dcl_sampler s2, mode_default
dcl_sampler s3, mode_default
dcl_sampler s4, mode_default
dcl_sampler s5, mode_default
dcl_sampler s6, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_resource_texture2d (float,float,float,float) t1
dcl_resource_texture2d (float,float,float,float) t2
dcl_resource_texture2d (float,float,float,float) t3
dcl_resource_texture2d (float,float,float,float) t4
dcl_resource_texture2d (float,float,float,float) t5
dcl_resource_texture2d (float,float,float,float) t6
dcl_input_ps linear v0.xyzw
dcl_input_ps linear v1.xyzw
dcl_input_ps_siv linear noperspective v2.xy, position
dcl_output o0.xyzw
dcl_temps 18
dcl_resource_texture2d (float,float,float,float) t125
ld_indexable(texture2d)(float,float,float,float) r4.xyzw, l(0, 0, 0, 0), t125.xyzw
dcl_constantbuffer cb13[10], immediateIndexed
mad r0.xy, v2.xyxx, cb0[0].zwzz, cb0[0].xyxx

mov r10.xy, r0.xyxx
add r10.x, -r4.x, r10.x

sample_l_indexable(texture2d)(float,float,float,float) r0.z, r0.xyxx, t0.yzxw, s0, l(0.000000)
mul r0.z, r0.z, l(255.000000)
ftou r0.z, r0.z
and r0.z, r0.z, l(4)
ine r0.z, r0.z, l(4)
if_nz r0.z
  mov o0.xyzw, l(0,0,0,0)
  ret
endif
sample_l_indexable(texture2d)(float,float,float,float) r0.z, r0.xyxx, t1.yzxw, s1, l(0.000000)

add r6.xyzw, v0.xyzw, -v1.xyzw
//Comment.
mad r6.xyzw, r0.zzzz, r6.xyzw, v1.xyzw
mov r5.xyzw, v0.xyzw
//mad r7.w, r4.y, r6.w, l(-1.0)
mad r7.w, l(0.0), r6.w, l(-1.0)
div r7.w, r7.w, r0.z
mul r7.x, r7.w, cb13[0].x
mul r7.y, r7.w, cb13[1].x
mul r7.z, r7.w, cb13[2].x
//mad r5.xyz, r4.xxxx, r7.xyzx, r5.xyzx
add r1.xyzw, r5.xyzw, -v1.xyzw
mad r1.xyzw, r0.z, r1.xyzw, v1.xyzw

//mad r1.x, r4.x, r1.w, r1.x

div r1.xyz, r1.xyzx, r1.wwww
add r1.xyz, r1.xyzx, cb0[1].xyzx
add r1.xyz, r1.xyzx, -cb0[2].xyzx
mov r1.w, l(1.000000)



dp4 r2.x, r1.xyzw, cb0[3].xyzw
dp4 r2.y, r1.xyzw, cb0[4].xyzw
dp4 r0.z, r1.xyzw, cb0[5].xyzw

//mad r2.x, r4.x, r0.z, r2.x

div r0.zw, r2.xxxy, r0.zzzz
mad r1.xy, r0.zwzz, l(0.500000, 0.500000, 0.000000, 0.000000), l(0.500000, 0.500000, 0.000000, 0.000000)
sample_l_indexable(texture2d)(float,float,float,float) r0.zw, r0.xyxx, t2.zwxy, s2, l(0.000000)
lt r1.w, r0.z, l(1.000000)
add r1.z, -r1.y, l(1.000000)
add r1.xy, r0.xyxx, -r1.xzxx
movc r0.zw, r1.wwww, r0.zzzw, r1.xxxy
ne r1.xy, r0.zwzz, r0.zwzz
or r1.x, r1.y, r1.x
and r1.yz, r0.zzwz, l(0, 0x7fffffff, 0x7fffffff, 0)
ieq r1.yz, r1.yyzy, l(0, 0x7f800000, 0x7f800000, 0)
or r1.x, r1.y, r1.x
or r1.x, r1.z, r1.x
sample_l_indexable(texture2d)(float,float,float,float) r2.xyzw, r0.xyxx, t3.xyzw, s3, l(0.000000)
movc r0.zw, r1.xxxx, l(0,0,-0.000000,-0.000000), -r0.zzzw
add r0.zw, r0.zzzw, r0.xxxy
mad r1.xy, r0.zwzz, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
ge r1.xy, |r1.xyxx|, l(1.000000, 1.000000, 0.000000, 0.000000)
or r1.x, r1.y, r1.x
mov o0.xyzw, r2.xyzw
retc_nz r1.x
sample_l_indexable(texture2d)(float,float,float,float) r1.xyzw, r0.zwzz, t4.xyzw, s4, l(0.000000)
eq r3.x, r1.w, l(0.000000)
movc r1.xyzw, r3.xxxx, r2.xyzw, r1.xyzw
sample_l_indexable(texture2d)(float,float,float,float) r0.x, r0.xyxx, t5.xyzw, s5, l(0.000000)
mul r0.x, r0.x, l(255.000000)
ftou r0.x, r0.x
and r0.x, r0.x, l(2)
sample_l_indexable(texture2d)(float,float,float,float) r0.y, r0.zwzz, t6.yxzw, s6, l(0.000000)
mul r0.y, r0.y, l(255.000000)
ftou r0.y, r0.y
and r0.y, r0.y, l(2)
ine r0.x, r0.y, r0.x
movc r0.x, r0.x, l(0), l(0.500000)
add r1.xyzw, -r2.xyzw, r1.xyzw
mad r0.xyzw, r0.xxxx, r1.xyzw, r2.xyzw
mov o0.xyzw, r0.xyzw
ret
// Approximately 58 instruction slots used
