 varying vec4 v_color;
 varying float v_width;
+
+float getPointOnLine(vec2 p0, vec2 p1, float x)
+{
+    float slope = (p0.y - p1.y) / (p0.x - p1.x);
+    return slope * (x - p0.x) + p0.y;
+}
 
 czm_material czm_getMaterial(czm_materialInput materialInput)
 {

    s *= 1.0 - step(base, st.s);
    
    float t = step(base, materialInput.st.s);
    t *= 1.0 - step(upperSlope * (st.s - upperBase.x) + upperBase.y, st.t);
    t *= step(lowerSlope * (st.s - lowerBase.x) + lowerBase.y, st.t);
    
    material.diffuse = v_color.rgb;
    material.alpha = clamp(s + t, 0.0, 1.0);
    return material;
}

    vec2 st = materialInput.st;
    
    float base = 1.0 - dFdx(st.s) * 10.0;
    vec2 center = vec2(1.0, 0.5);
    float ptOnUpperLine = getPointOnLine(vec2(base, 1.0), center, st.s);
    float ptOnLowerLine = getPointOnLine(vec2(base, 0.0), center, st.s);
    
    float halfWidth = 0.15;
    float s = step(0.5 - halfWidth, st.t);
