How do I fix texture seam from UV spherical mapping?

So, I’m mapping an earth texture to an Icosphere, and ran into the standard issue of the vertices of triangles on the texture boundary spanning and interpolating the entire texture causing a big ugly seam.

I fixed this with the standard fragment shader solution:

            float4 frag(v2f i) : COLOR {
                float3 tc = i.tex;
                float3 norm;
                float3 p;
                p.x = i.pass_xy_position.x;
                p.y = i.pass_xy_position.y;
                p.z = i.pass_xy_position.z;
                norm.x = sqrt(p.x*p.x + p.y*p.y + p.z*p.z);
                tc.x = (PI + atan2(p.z, p.x)) / (2 * PI);
                tc.y = (PI / 2 + asin(p.y / norm.x)) / PI;
                float4 color = tex2D(decal, tc);
                return color;
            }

but I’m still left with a single pixel-wide seam at the texture longitude boundary, and some small distortions around the poles. I’ve tried a couple of different textures from the NASA Blue Earth site, and see the same issue. Any help would be greatly appreciated.

I know its kinda late but hopefully it will help someone