//
// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
//
// Parameters:
//
//   sampler2D PixelTexture2D_1;
//   sampler2D PixelTexture2D_2;
//   sampler2D PixelTexture2D_3;
//   float4 ScreenDoorFadeSettings;
//   float4 ScreenDoorFadeSettings2;
//   sampler2D ScreenDoorNoiseTexture;
//   float4 ScreenPositionScaleBias;
//   float4 UniformPixelScalars_1;
//   float4 UniformPixelScalars_5;
//   float4 UniformPixelVector_5;
//   float4x4 ViewProjectionMatrix;
//   bool bEnableScreenDoorFade;
//
//
// Registers:
//
//   Name                    Reg   Size
//   ----------------------- ----- ----
//   bEnableScreenDoorFade   b0       1
//   ScreenDoorFadeSettings  c0       1
//   ScreenPositionScaleBias c1       1
//   ViewProjectionMatrix    c8       4
//   ScreenDoorFadeSettings2 c12      1
//   UniformPixelVector_5    c13      1
//   UniformPixelScalars_1   c14      1
//   UniformPixelScalars_5   c15      1
//   ScreenDoorNoiseTexture  s0       1
//   PixelTexture2D_1        s1       1
//   PixelTexture2D_2        s2       1
//   PixelTexture2D_3        s3       1
//

    ps_3_0
    def c2, 0.5, 1, -0.333299994, 0
    dcl_texcoord v0.xy
    dcl_texcoord5 v1
    dcl vPos.xy
    dcl_2d s0
    dcl_2d s1
    dcl_2d s2
    dcl_2d s3

def c220, 0, 1, 0.0625, 0.5
dcl_2d s15

    mul r0.xyz, c9.xyww, v1.y
    mad r0.xyz, c8.xyww, v1.x, r0
    mad r0.xyz, c10.xyww, v1.z, r0
    mad r0.xyz, c11.xyww, v1.w, r0

// Unreal Engine halo fix inserted with DarkStarSword's shadertool.py:
// shadertool.py -i --fix-unreal-ps-halo --stereo-sampler-ps=s15 --only-autofixed CRC32_F6DFDB13_0.txt
texldl r31, c220.z, s15
add r31.w, r0.z, -r31.y
mad r0.x, r31.w, r31.x, r0.x

    texld r1, v0, s1
    rcp r0.z, r0.z
    mul r0.xy, r0.z, r0
    mad r0.xy, r0, c1, c1.wzzw
    rcp r0.z, c14.y
    mad r0.xy, r0, r0.z, c13
    add r0.zw, r0.xyxy, c2.x
    texld r2, r0.zwzw, s2
    texld r0, r0, s3
    mul r0.x, r0.x, r2.x
    mov r0.y, c2.y
    mad r0.x, c15.x, -r0.x, r0.y
    mul r0.x, r0.x, c15.y
    mad r1, r1.w, r0.x, c2.z
    texkill r1
    if b0
      mad r0.xz, vPos.xyyw, c12.zyww, c12.xyyw
      texld_pp r1, r0.xzzw, s0
      mad r0.x, c0.y, r1.x, c0.z
      add r0.y, r0.y, -c0.x
      add r0, -r0.y, r0.x
      texkill r0
    endif
    mov oC0, c2.w

// approximately 30 instruction slots used (4 texture, 26 arithmetic)
