//
// Generated by Microsoft (R) D3DX9 Shader Compiler 9.08.299.0000
//
//   psa shaderdump19/WATER014.pso /Fcshaderdump19/WATER014.pso.dis
//
//
// Parameters:
//
float4 Scroll : register(c0);
float4 EyePos : register(c1);
float4 SunDir : register(c2);
float4 SunColor : register(c3);
float4 NotUsed4 : register(c4);
float4 ShallowColor : register(c5);
float4 DeepColor : register(c6);
float4 ReflectionColor : register(c7);
float4 VarAmounts : register(c8);
float4 FogParam : register(c9);
float4 FogColor : register(c10);
float4 FresnelRI : register(c11);
float4 BlendRadius : register(c12);
float4 TESR_SunColor : register(c13);
float4 TESR_WaterCoefficients : register(c14);
float4 TESR_WaveParams : register(c15);
float4 TESR_WaterVolume : register(c16);
float4 TESR_WaterSettings : register(c17);
float4 TESR_ReciprocalResolution : register(c18);
float4 TESR_Tick : register(c19);
float4x4 TESR_ViewTransform : register(c20);
float4x4 TESR_ProjectionTransform : register(c24);

sampler2D ReflectionMap : register(s0);
sampler2D NormalMap : register(s1);
sampler2D DetailMap : register(s2);
sampler2D DepthMap : register(s3);
sampler2D DisplacementMap : register(s4);
sampler2D TESR_RenderedBuffer : register(s5) = sampler_state { };
sampler2D TESR_DepthBuffer : register(s6) = sampler_state { };
//
//
// Registers:
//
//   Name         Reg   Size
//   ------------ ----- ----
//   Scroll       const_0       1
//   EyePos       const_1       1
//   ShallowColor const_5       1
//   DeepColor    const_6       1
//   VarAmounts   const_8       1
//   FogParam     const_9       1
//   FogColor     const_10      1
//   FresnelRI    const_11      1
//   NormalMap    texture_1       1
//   DetailMap    texture_2       1
//


// Structures:

struct VS_OUTPUT {
    float3 texcoord_1 : TEXCOORD1_centroid;
    float2 texcoord_6 : TEXCOORD6;
};

struct PS_OUTPUT {
    float4 color_0 : COLOR0;
};

// Code:

PS_OUTPUT main(VS_OUTPUT IN) {
    PS_OUTPUT OUT;

#define	expand(v)		(((v) - 0.5) / 0.5)
#define	compress(v)		(((v) * 0.5) + 0.5)
#define	shade(n, l)		max(dot(n, l), 0)
#define	shades(n, l)		saturate(dot(n, l))
#define	weight(v)		dot(v, 1)
#define	sqr(v)			((v) * (v))

    float3 eye;
    float q7;
    float3 q9;
    float3 r0;

    eye.xyz = EyePos.xyz - IN.texcoord_1.xyz;
    q7 = 1 - saturate((FogParam.x - length(eye.xyz)) / FogParam.y);
    q9.xyz = float3(1,0.33,0.1);
    r0.xyz = (q7 * (FogColor.rgb - q9.xyz)) + q9.xyz;

    OUT.color_0.a = 1;
    OUT.color_0.rgb = r0.xyz;

    return OUT;
};

// approximately 45 instruction slots used (2 texture, 43 arithmetic)
