#version 120
uniform sampler2D tex0;
varying vec3 pos;

void main(){
    gl_FragColor = texture2D(tex0, gl_TexCoord[0].xy) + texture2D(tex0, gl_TexCoord[1].xy) * vec4(0.3,0.5,0.7,0.0);

    vec4 color_top = vec4(0.2, 0.25, 0.3, 0.0) * 0.15;
    vec4 color_horizon = vec4(0.5, 0.6, 0.7, 0.0) * 0.05;

    gl_FragColor = mix(color_horizon, gl_FragColor, pow(pos.z, 1.5));

    //gl_FragColor += mix(color_horizon, color_top, pos.z);
    //gl_FragColor += mix(color_horizon, vec4(0.0, 0.0, 0.0, 0.0), max(pos.x, 0.0));
    //gl_FragColor = vec4(1.0, 1.0, 0.0, 1.0);
}
