I’m trying to stick in a background for a logging in state for my project. I’m just using a simple texture, but I’m seeing some strange horizontal artifacts on the image when it’s rendered in game. The original image is here and a screen shot is here. As you can see, there are artifacts running from side to side on the screenshot on the grey areas, almost purple in areas. They are not there in the original though.
Here is the standard code I use.
Texture.FM_LINEAR, 1.0f, false));
I've also tried MM_NONE and a variety of other mipmap settings incase it was that.
Yeah, I think shingoki is spot on.
The texture is probably resized because it's not square and a power of two. You should see a warning message about this somewhere in the debug output.
not nice of you to use a texture of size 799x601 but it also looks like you are running the game in 16bit color depth?
That was true, but I fixed it, there is a png version that is resized with alpha around it, I uploaded the jpg by mistake.
Here is the png version with the surrounding alpha’d border here
P.S. the properties dialog has 32 bit selected :), but yes, thats exactly the sort of thing.
Any more ideas?
It looks horrid
post some more code on how you set things up…and, have you tried any other images to see if the same things happens there?
Perhaps it is mipmapping that is uglifying (God, I kill me) your image. Try loading it with:
Texture.FM_NEAREST, 1.0f, false));
I could be wrong… but it looks like the result of compression on texture loading.
Try loading like this:
//Make sure we don't use compression, which makes images with gradients look awful
I had the same thing with my skybox images, took me a while to work it out
Give that man a cigar
Thank you all for looking at this.