// Summary: Ported XBOX auto exposure
// Generated by Microsoft (R) HLSL Shader Compiler 9.26.952.2844
//
// Parameters:
//
//   float Exposure;
//   sampler2D HDRSampler;
//   float4 TexelSize;
//
//
// Registers:
//
//   Name         Reg   Size
//   ------------ ----- ----
//   Exposure     c66      1
//   TexelSize    c72      1
//   HDRSampler   s0       1
//

    ps_3_0
    def c219, 1.8395173895e+25, 3.9938258725e+24, 4.5435787456e+30, 1.1308478607e-42 // 807
    def c0, 0.111111112, 0.0625, 0, 0
    def c1, 0.5, 1.5, -1.5, -0.5
    dcl_texcoord v0.xy
    dcl_2d s0
    mov r0, c72.xyxy
    
    mad r1, r0, c1.xxxy, v0.xyxy
    texld r2, r1.xy, s0
    texld r3, r1.zw, s0
    add r2.x, r2.x, r3.x
    mad r1, r0, c1.xzxw, v0.xyxy
    texld r3, r1.xy, s0
    add r2.x, r2.x, r3.x
    texld r3, r1.zw, s0
    add r2.x, r2.x, r3.x
    mad r1, r0, c1.yxyy, v0.xyxy
    texld r3, r1.xy, s0
    add r2.x, r2.x, r3.x
    texld r3, r1.zw, s0
    add r2.x, r2.x, r3.x
    mad r1, r0, c1.yzyw, v0.xyxy
    texld r3, r1.xy, s0
    add r2.x, r2.x, r3.x
    texld r3, r1.zw, s0
    add r2.x, r2.x, r3.x
    mad r1, r0, c1.zxzy, v0.xyxy
    texld r3, r1.xy, s0
    add r2.x, r2.x, r3.x
    texld r3, r1.zw, s0
    add r2.x, r2.x, r3.x
    mad r1, r0, c1.zzzw, v0.xyxy
    texld r3, r1.xy, s0
    add r2.x, r2.x, r3.x
    texld r3, r1.zw, s0
    add r2.x, r2.x, r3.x
    mad r1, r0, c1.wxwy, v0.xyxy
    texld r3, r1.xy, s0
    add r2.x, r2.x, r3.x
    texld r3, r1.zw, s0
    add r2.x, r2.x, r3.x
    mad r1, r0, c1.wzww, v0.xyxy
    texld r3, r1.xy, s0
    add r2.x, r2.x, r3.x
    texld r3, r1.zw, s0
    add r2.x, r2.x, r3.x
    
    mov r3, c0
    cmp r3.x, -c222_abs.x, r3.y, r3.x // autoexposure toggle
    
    mov r2.y, c66.x
    mul r2.y, r2.y, r3.x
    mul oC0, r2.y, r2.x

// approximately 14 instruction slots used (4 texture, 10 arithmetic)
