//
// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
//
// Parameters:
//
//   float4 DiffuseOverrideParameter;
//   float4 LightColorAndFalloffExponent;
//   sampler2D PixelTexture2D_0;
//   sampler2D PixelTexture2D_1;
//   sampler2D PixelTexture2D_2;
//   float4 ScreenPositionScaleBias;
//   float4 SpecularOverrideParameter;
//   float4 UniformPixelScalars_0;
//   float4 UniformPixelScalars_1;
//   float4 UniformPixelScalars_4;
//   float4 UniformPixelScalars_5;
//   float4 UniformPixelVector_0;
//   float4 UniformPixelVector_3;
//   float4x4 ViewProjectionMatrix;
//
//
// Registers:
//
//   Name                         Reg   Size
//   ---------------------------- ----- ----
//   UniformPixelVector_0         c0       1
//   ScreenPositionScaleBias      c1       1
//   DiffuseOverrideParameter     c4       1
//   SpecularOverrideParameter    c5       1
//   ViewProjectionMatrix         c8       4
//   UniformPixelVector_3         c12      1
//   UniformPixelScalars_0        c13      1
//   UniformPixelScalars_1        c14      1
//   UniformPixelScalars_4        c15      1
//   UniformPixelScalars_5        c16      1
//   LightColorAndFalloffExponent c17      1
//   PixelTexture2D_0             s0       1
//   PixelTexture2D_1             s1       1
//   PixelTexture2D_2             s2       1
//

    ps_3_0
    def c2, 0, 2, 1, -9.99999997e-007
    def c3, 0.5, 0, 0, 0
    dcl_texcoord v0.xy
    dcl_texcoord4_pp v1.xyz
    dcl_texcoord6 v2.xyz
    dcl_texcoord7 v3
    dcl_2d s0
    dcl_2d s1
    dcl_2d s2

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

    nrm r0.xyz, v2
    mad r0.xyz, r0.z, c2.xxyw, -r0
    nrm_pp r1.xyz, v1
    dp3_sat_pp r0.x, r0, r1
    mov_sat_pp r0.y, r1.z
    add r0.z, r0.x, c2.w
    pow_pp r1.x, r0.x, c13.z
    texld r2, v0, s0
    mul_pp r1.yzw, r2.xxyz, c13.y
    mad_pp r1.yzw, r1, c5.w, c5.xxyz
    mul_pp r1.xyz, r1.yzww, r1.x
    cmp_pp r0.xzw, r0.z, r1.xyyz, c2.x
    mov_pp r1.z, c2.z
    add r1.xyw, r1.z, -c0.xyzz
    mul_pp r1.xyw, r1, r2.xyzz
    add r2.x, r2.w, c13.w
    mad_pp r1.xyw, r1, c4.w, c4.xyzz
    mul r1.xyw, r0.y, r1
    add r0.y, r0.y, c2.w
    cmp r1.xyw, r0.y, r1, c2.x
    add_pp r0.xyz, r0.xzww, r1.xyww
    mul oC0.xyz, r0, c17
    mul r0.xyz, c9.xyww, v3.y
    mad r0.xyz, c8.xyww, v3.x, r0
    mad r0.xyz, c10.xyww, v3.z, r0
    mad r0.xyz, c11.xyww, v3.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_FB9F6402_0.txt
texldl r31, c220.z, s15
add r31.w, r0.z, -r31.y
mad r0.x, r31.w, r31.x, r0.x

    rcp r0.z, r0.z
    mul r0.xy, r0.z, r0
    mad r0.xy, r0, c1, c1.wzzw
    rcp r0.z, c14.x
    mad r0.xy, r0, r0.z, c12
    add r0.zw, r0.xyxy, c3.x
    texld r3, r0, s2
    texld r0, r0.zwzw, s1
    mul r0.x, r3.x, r0.x
    mad r0.x, c15.w, -r0.x, r1.z
    mul r0.x, r0.x, c16.x
    mul_pp oC0.w, r0.x, r2.x

// approximately 44 instruction slots used (3 texture, 41 arithmetic)
