//
// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
//
// Parameters:
//
//   float4 DiffuseOverrideParameter;
//   float4 LightColorAndFalloffExponent;
//   sampler2D PixelTexture2D_10;
//   sampler2D PixelTexture2D_11;
//   sampler2D PixelTexture2D_9;
//   float4 ScreenPositionScaleBias;
//   float4 SpecularOverrideParameter;
//   float4 UniformPixelScalars_10;
//   float4 UniformPixelScalars_6;
//   float4 UniformPixelVector_8;
//   float4x4 ViewProjectionMatrix;
//
//
// Registers:
//
//   Name                         Reg   Size
//   ---------------------------- ----- ----
//   UniformPixelVector_8         c0       1
//   ScreenPositionScaleBias      c1       1
//   DiffuseOverrideParameter     c4       1
//   SpecularOverrideParameter    c5       1
//   ViewProjectionMatrix         c8       4
//   UniformPixelScalars_6        c12      1
//   UniformPixelScalars_10       c13      1
//   LightColorAndFalloffExponent c14      1
//   PixelTexture2D_9             s0       1
//   PixelTexture2D_10            s1       1
//   PixelTexture2D_11            s2       1
//

    ps_3_0
    def c2, 1.39999998, 0.5, 1, -19.9315681
    def c3, 0, 2, -9.99999997e-007, 1.39999998
    def c6, -0.0500000007, 0, 1, 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, c3.xxyw, -r0
    nrm_pp r1.xyz, v1
    dp3_sat_pp r0.x, r0, r1
    mov_sat_pp r0.y, r1.z
    pow_pp r1.x, r0.x, c12.x
    add r0.x, r0.x, c3.z
    mul_pp r1.xyz, r1.x, c5
    cmp_pp r0.xzw, r0.x, r1.xyyz, c3.x
    add r1.x, r0.y, c3.z
    mul r1.yzw, r0.y, c4.xxyz
    cmp r1.xyz, r1.x, r1.yzww, c3.x
    add_pp r0.xyz, r0.xzww, r1
    mul oC0.xyz, r0, c14
    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_6267F68D_1039.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, c12.y
    mad r0.xy, r0, r0.z, c0
    mad r0.zw, r0.xyxy, c2.x, c2.y
    mul r0.xy, r0, c3.w
    texld r1, r0, s1
    texld r0, r0.zwzw, s0
    mul r0.x, r1.x, r0.x
    texld r1, v0, s2
    add r0.y, -r1.x, c2.z
    mad r0.x, r0.x, -r0.y, c2.z
    add r0.y, r0_abs.x, c3.z
    log r0.x, r0_abs.x
    cmp r0.x, r0.y, r0.x, c2.w
    mul r0.x, r0.x, c13.x
    exp r0.x, r0.x
    mov r0.y, c12.y
    add r0.y, r0.y, c6.x
    cmp r0.y, r0.y, c6.y, c6.z
    add_sat r0.x, r0.y, r0.x
    mad_sat_pp oC0.w, c13.y, r0.x, c13.z

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