//
// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
//
// Parameters:
//
//   float4 AspectRatioAndInvAspectRatio;
//   float BloomScreenBlendThreshold;
//   float4 BloomTintAndThreshold;
//   float DistanceFade;
//   float4 LightShaftParameters;
//   sampler2D SceneColorTexture;
//   sampler2D SourceTexture;
//   float2 TextureSpaceBlurOrigin;
//
//
// Registers:
//
//   Name                         Reg   Size
//   ---------------------------- ----- ----
//   TextureSpaceBlurOrigin       c0       1
//   AspectRatioAndInvAspectRatio c9       1
//   LightShaftParameters         c10      1
//   BloomTintAndThreshold        c11      1
//   DistanceFade                 c12      1
//   BloomScreenBlendThreshold    c13      1
//   SceneColorTexture            s0       1
//   SourceTexture                s1       1
//

    ps_3_0
    def c1, 4, 0, 0, 0
    def c2, 0.5, 1.5, 0, 1
    def c3, 0.300000012, 0.589999974, 0.109999999, -3
    dcl_texcoord v0.xy
    dcl_texcoord1 v1.xy
    dcl_2d s0
    dcl_2d s1

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


// Unreal light shaft fix inserted with DarkStarSword's shadertool.py:
// shadertool.py -i -f --auto-fix-unreal-light-shafts --only-autofixed --git CRC32_7DCDC8E7_0.txt
texldl r4, c220.z, s14
mov r3, c0 // TextureSpaceBlurOrigin
mad r3.x, r4.x, c220.w, r3.x // Adjust each eye by 1/2 separation

    mov r0.zw, c9
    mad r0.xy, v0, -r0.zwzw, r3
    dp2add r0.x, r0, r0, c2.z
    rsq r0.x, r0.x
    rcp r0.x, r0.x
    mul_sat r0.x, r0.x, c2.x
    mov r1.xy, c2
    mad r0.y, c10.w, -r1.x, r1.y
    texld_pp r1, v0, s1
    mul_pp r0.z, r1.w, r1.w
    mul_pp r1.xyz, r1, c11
    lrp r1.w, r0.z, r0.y, c10.w
    lrp r2.x, r0.x, c2.w, r1.w
    add r0.x, -r2.x, c2.w
    mul r0.y, c12.x, c12.x
    mul r0.y, r0.y, c12.x
    mad_pp oC0.w, r0.y, r0.x, r2.x
    texld_pp r0, v1, s0
    dp3_pp r0.x, r0, c3
    mul_pp r0.x, r0.x, c3.w
    exp_pp r0.x, r0.x
    mul_sat_pp r0.x, r0.x, c13.x
    mul r0.xyz, r0.x, r1
    mul_pp oC0.xyz, r0, c1.x

// approximately 25 instruction slots used (2 texture, 23 arithmetic)
