VARYING vec2 uv;

void MAIN()
{
    vec4 nightcol = texture(desertTexture, uv*200);
    vec4 daycol = texture(desertTextureDay, uv*200);
    vec4 finalcolor = mix(nightcol, daycol, dayt);
    // world position alpha distance blend
    if (VAR_WORLD_POSITION.z < -700) {
        float alpha = 1.0 - ((700 + VAR_WORLD_POSITION.z) / -700);
        BASE_COLOR = vec4(finalcolor.rgb * alpha, alpha);
    } else {
        BASE_COLOR = vec4(finalcolor.rgb, 1.0);
    }
}
