I am currently running into issues right now when I render my background image for my app. It has jagged edges in it as you can see:
https://i.stack.imgur.com/SrFgw.jpg
Now, here is the code which I am using to load the image in, and I have tried all possible combinations of the filtering so this is not the only one I have tried.
newPenguinGraphic = new Texture(Gdx.files.internal("data/1024Set1.png"),true);
texture.setFilter(TextureFilter.MipMapLinearNearest, TextureFilter.Nearest);
Screen setup:
float gameWidth = 330;
float gameHeight = screenHeight / (screenWidth / gameWidth);
int midPointY = (int) (gameHeight / 2);
Cam:
cam = new OrthographicCamera();
cam.setToOrtho(true, 330, gameHeight);
Graphic:
MainBackground = new BGScroller(0, yPos-165, 330, 220, SCROLL_SPEED, yPos);
The size of the original image is 688x459 also btw.
A question I have been wondering, do I need to generate the mipmap png files before and load them in manually or does libgdx literally create them at runtime? Please help, and thanks!!