 
     float theta = scrpos.y * PI;
     float phi = PI + ln + scrpos.x * TWOPI;
-    while (phi > TWOPI)
-        phi -= TWOPI;
 
     vec3 xcart;
     xcart.x = sin(theta) * cos(phi);

        discard;
    texcoord = vec2(rect.w * (xcartrot.y - rect.x), rect.w * (xcartrot.z - rect.y));
    clamp_texcoord(texcoord);

//    float f = xcartrot.z * xcartrot.z + xcartrot.y * xcartrot.y;
//    radius = f * f;
    radius = 1.;
}

void main(void) {

        discard;
    vec4 color;
    vec2 texcoord;
    get_lati_texcoord(hgln, hglt, crota, rect, texcoord);
    if (isdifference == NODIFFERENCE) {
        color = getColor(texcoord, texcoord, 1);
    } else {
        vec2 difftexcoord;
        float difftexcoord_radius;
        get_lati_texcoord(hglnDiff, hgltDiff, crotaDiff, differencerect, difftexcoord);
        color = getColor(texcoord, difftexcoord, 1);
    }
    gl_FragColor = color;
}
