libgdx/lwjgl jerkiness rendering meshes / texture regions

I am rendering some textured cubes along with libgdx’s TextureRegion (which are essentialy textured quads) and I’m seeing some jerkiness when the camera moves. It seems like te textures are “shaking” a little as the camera moves. It’s a little difficult to express in words, but sometimes it seems like some pixels are blinking or shaking.

The only thing moving is the camera, the objects don’t change their position.

The texture for the cubes are 128x128 areas on a 512x512 png texture (the bricks in the image). The objects like the windows and purple thingie are TextureRegions from a 1024x1024 image.

Any ideas on what might solve that ?

Generate mipmaps and configure the texture filters to use said mipmaps :slight_smile:

Thank you for the tip. I did that but it seems that it didn’t help.


		Texture t =new Texture(texture,true); //true means generate mipmap
		t.setFilter(TextureFilter.MipMapNearestLinear, TextureFilter.MipMapNearestLinear);  

I tried several combinations of TextureFilter with no success. Some made it look worse though, with some texture bleeding.
To better illustrate my problem, here are two screenshots of the same object, but with a slight camera movement (like 4 or 5 pixels).
Notice the white rectangle outlines. They change a bit, but with movement and at 60fps that looks really bad.

I appreciate more suggestions.

EDIT: my quads are drawn in a scale of 1 - that is that window has the width and height of approx. 1 . I’m not sure if it’s better to have like 64 for width and height to avoid some floating point precision loss. Does that make any sense ?