// Summary: removed unnecessary stipple + fixed windows not covered by fog near the far plane if depth write is disabled
// Generated by Microsoft (R) HLSL Shader Compiler 9.26.952.2844
//
// Parameters:
//
//   sampler2D StippleTexture;
//   sampler2D TextureSampler;
//   float4 colorize;
//   float emissiveMultiplier;
//   float4 globalScalars;
//
//
// Registers:
//
//   Name               Reg   Size
//   ------------------ ----- ----
//   globalScalars      c39      1
//   colorize           c51      1
//   emissiveMultiplier c66      1
//   TextureSampler     s0       1
//   StippleTexture     s10      1
//

    ps_3_0
    def c219, 1.8395173895e+25, 3.9938258725e+24, 4.5435787456e+30, 2.6904930515e-43 // 192
    def c127, 0.9999999, 1, 0.999, 0 // LogDepth constants
    def c0, 3.99600005, 4, 0.125, 0.25
    def c1, 0, -1, -0, 0
    dcl_texcoord v0.xy
    dcl_color v1
    dcl vPos.xy
    dcl_texcoord9 v9
    dcl_2d s0
    dcl_2d s10
    /* removed stipple
    mov_sat r0.x, c39.x
    mul r0.x, r0.x, c0.x
    frc r0.y, r0.x
    mul r0.z, r0.y, c0.y
    frc r0.w, r0.z
    add r1.xy, r0.zxzw, -r0.wyzw
    mul r0.xy, c0.z, vPos
    frc r0.xy, r0_abs
    cmp r0.xy, vPos, r0, -r0
    mul r0.xy, r0, c0.w
    mad r0.xy, r1, c0.w, r0
    mov r0.zw, c1.x
    texldl r0, r0, s10
    cmp r0, -r0.y, c1.y, c1.z
    texkill r0
    removed stipple */
    texld r0, v0, s0
    mul r0, r0, v1
    mul r1.xyz, r0, c66.x
    mul r1.w, r0.w, c39.x
    mul oC0, r1, c51
    // ----------------------------------------------------------------- Linear2Log -----------------------------------------------------------------
    if_ne v9.y, c127.y
      rcp r20.z, c128.x
      min r20.w, v9.w, c128.y
      mul r20.x, r20.w, r20.z
      mul r20.y, c128.y, r20.z
      log r20.x, r20.x
      log r20.y, r20.y
      rcp r20.y, r20.y
      mad r20.w, r20.x, -r20.y, c127.z
      texkill r20.w
      mad r20.z, r20.x, r20.y, -v9.x
    else
      mov r20.x, v9.z
      rcp r20.y, v9.w
      mul r20.z, r20.x, r20.y
    endif
    mov oDepth, r20.z
    // ----------------------------------------------------------------------------------------------------------------------------------------------

// approximately 21 instruction slots used (3 texture, 18 arithmetic)
