I am using a fragment shader (below) to create a greyscale earth, but it's causing a problem with some tiles (see screenshot).
Looks like the its sometimes using the texture coordinates from the neighbouring tile for some reason. Anyone had this problem or know how to solve it?
Note the tiles are rendered correctly if I disable the shader.
uniform sampler2D testTexture;
void main( void )
vec4 texelColor = texture2D( testTexture, gl_TexCoord.xy );
vec4 greyWeights = vec4(0.3, 0.59, 0.11, 1.0);
vec4 scaledColor = texelColor * greyWeights;
float luminance = scaledColor.r + scaledColor.g + scaledColor.b;
gl_FragColor = vec4( luminance, luminance, luminance, texelColor.a );