// Light shafts
// 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 c8       1
//   LightShaftParameters         c9       1
//   BloomTintAndThreshold        c10      1
//   DistanceFade                 c11      1
//   BloomScreenBlendThreshold    c12      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
def c220, 0, 1, 0.0625, 0.5		
    dcl_texcoord v0.xy
    dcl_texcoord1 v1.xy
    dcl_2d s0
    dcl_2d s1
dcl_2d s13	
    mov r0.zw, c8
// Adjust the blur offset to match the light shaft adjustment:
//    mad r0.xy, v0, -r0.zwzw, c0
mov r4, c0
texldl r5, c220.z, s13
mul r5.x, r5.x, c220.w	// Adjust each eye by half the separation
add r4.x, r4.x, r5.x
mad r0.xy, v0, -r0.zwzw, r4	
    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, c9.w, -r1.x, r1.y
    texld_pp r1, v0, s1
    mul_pp r0.z, r1.w, r1.w
    mul_pp r1.xyz, r1, c10
    lrp r1.w, r0.z, r0.y, c9.w
    lrp r2.x, r0.x, c2.w, r1.w
    add r0.x, -r2.x, c2.w
    mul r0.y, c11.x, c11.x
    mul r0.y, r0.y, c11.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, c12.x
    mul r0.xyz, r0.x, r1
    mul_pp oC0.xyz, r0, c1.x

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