#include "version.sh"
uniform lowp float iShadow;
uniform lowp vec4 colorshadow;
uniform lowp vec4 color;
uniform lowp vec4 colormain;
uniform lowp vec4 color0;

in highp float type;

out lowp vec4 fragColor;

void main()
{
    if (iShadow > 0.001)
        fragColor = colorshadow;
    else
    {
        if (type < 1.001 && type > 0.999)
        {
            fragColor = colormain; // 主桥面
        }
        else if (type < 2.001 && type > 1.999)
        {
            fragColor = color;     // 普通上行面
        }
        else if (type < 3.001 && type > 2.999)
        {
            fragColor = color0;    // 台阶面
            fragColor.a = 0.0;
        }
    }
}
