I've created a program that uses a tilemap to draw textures from a texture atlas onto a quad using HLSL.
I now however have texture bleeding and I have no idea how to set the SamplerState to sample on Point (so each actual pixel in the texture is used). I have tried setting it manually inside the shader like this:
AddressU = Wrap;
AddressV = Wrap;
MinFilter = Point;
MagFilter = Point;
MipFilter = Point;
But there is no visual change. I also tried creating a SamplerState object and setting the Filter to TextureFilter.Point then assigning GraphicsDevice.SamplerStates to this SamplerState object. Then using a register like this: SamplerState SpriteSheetSampler : register(s0); However this also didn't change anything.
Just to be sure, this is what I'm looking at:
And these are the neighbouring tiles of the blue tile:
So it's sampling the purple, yellow and brown from within the blue tile.
Lastly I have these two anomalies that I have no clue what's causing them:
1) Once zoomed out the "dirt" tiles become magnified, and then after a certain point are mirrored (or inverted, I'm not sure) and then become smaller again.
2) Lines appear when zooming out:
I'm hoping someone with extensive (or not) knowledge knows how to fix these issues?