Texture glitch when using simple pixel shader I have an issue with rendering my textures in Silverlight. When I look at it from above everything looks fine:

But if I only change angle of watching it it looks terrible:

I am using very simple pixel shader (hlsl):
float4 main(VsOutput vertex) : COLOR
{
        float4 texColor = tex2D(textureSampler, texCoord);

        return texColor;
}

If I don' t use that pixel shader and load texture via BasicEffect like:
BasicEffect.texture = myTexture

Everything looks fine. Why my pixel shader affects texture so bad?

I expect that it might be somehow connected with mipmapping, but I am not sure - my texture is pretty small so I guess it shouldn' t have such a big effect. Anyway I need some advices :).
So I followed Alan Wolfe suggestion (in comment to my question) And turned out he was right. I was using SamplerState.LinearWrap and that was the issue. When I changed this to AnisotropicWrap it looked much better. Below are some examples of different sampling types and how they affect texture:

graphicsDevice.SamplerStates[0] = SamplerState.PointWrap;




graphicsDevice.SamplerStates[0] = SamplerState.LinearWrap;




graphicsDevice.SamplerStates[0] = SamplerState.AnisotropicWrap;