// Fog effect on floor
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
//
// Parameters:
//
//   float4 MinZ_MaxZRatio;
//   float NvStereoEnabled;
//   sampler2D NvStereoFixTexture;
//   sampler2D PixelTexture2D_0;
//   sampler2D PixelTexture2D_1;
//   sampler2D SceneColorTexture;
//   float4 ScreenPositionScaleBias;
//   float4 UniformPixelVector_0;
//   float4 UniformPixelVector_1;
//   float4 UniformPixelVector_2;
//
//
// Registers:
//
//   Name                    Reg   Size
//   ----------------------- ----- ----
//   UniformPixelVector_0    c0       1
//   ScreenPositionScaleBias c1       1
//   MinZ_MaxZRatio          c2       1
//   NvStereoEnabled         c3       1
//   UniformPixelVector_1    c8       1
//   UniformPixelVector_2    c9       1
//   SceneColorTexture       s0       1
//   NvStereoFixTexture      s1       1
//   PixelTexture2D_0        s2       1
//   PixelTexture2D_1        s3       1
//

    ps_3_0

def c200, 0, 1, 0.0625, 0	// x=0 for comparison to Const1
	
    def c4, 1, -9.99999997e-007, 0.800000012, 0
    def c5, 2, 0.600000024, 1.5, 0.00066666666
    def c6, 0.0625, 0, 0.000133333335, 0
    dcl_texcoord4 v0
    dcl_texcoord6 v1.xyz
    dcl_texcoord5 v2.xyw
    dcl_texcoord v3.xy
    dcl_2d s0
    dcl_2d s1
    dcl_2d s2
    dcl_2d s3
    dp3 r0.x, v1, v1
    rsq r0.x, r0.x
    mul r0.x, r0.x, v1.z
    mov r1.xz, c5
    mad r0.yz, v3.xxyw, r1.x, c8.xxyw
    texld r2, r0.yzzw, s2
    mul r0.yzw, r2.xxyz, c5.y
    mad r1.xy, v3, r1.x, c9
    texld r2, r1, s2
    mul r0.yzw, r0, r2.xxyz
    mad_pp r0.yzw, r0, r1.z, c0.xxyz
    mul r1.x, c5.w, v2.w
    min r2.x, r1.x, c4.x
    add r1.x, r0_abs.x, c4.y
    mul r0.x, r0_abs.x, r0_abs.x
    mul r0.x, r0.x, r2.x
    texld r2, v3, s3
    mul r0.x, r0.x, r2.x
    mul r0.x, r0.x, c4.z
    cmp r0.x, r1.x, r0.x, c4.w
    min r1.x, r0.x, c4.x
    abs r0.x, c3.x
    if_ne c3.x, -c3.x
      texld r2, c6, s1
      add r1.y, -r2.y, v2.w
      mad r2.x, r2.x, r1.y, v2.x
      mov r2.yz, v2.xyww
    else
      mov r2.xyz, c4.w
    endif
    cmp r1.yzw, -r0.x, v2.xxyw, r2.xxyz
    rcp r0.x, r1.w
    mul r1.yz, r0.x, r1
    mad r2.xy, r1.yzzw, c1, c1.wzzw
    mov r2.zw, c4.w
    texldl r2, r2, s0
    mov r0.x, c4.x
    add r0.x, r0.x, -c2.y
    add r0.x, -r0.x, r2.w
    rcp r0.x, r0.x
    mad r0.x, -c2.x, r0.x, -v2.w
    mul_sat r0.x, r0.x, c6.z
    mul_pp oC0.w, r0.x, r1.x
    mad_pp oC0.xyz, r0.yzww, v0.w, v0
	
// Disable fog at bottom of maps effect
mov oC0.xyzw, c200.wwww

// approximately 47 instruction slots used (6 texture, 41 arithmetic)
 