LibGDX antialiasing

Viewed 7228

Is there a way to implement antialiasing in LibGDX?

My lines are very pixilated.

Screenshot

3 Answers

Set the number of samples in your Lwjgl3ApplicationConfiguration. It defaults to 0, try something higher:

final Lwjgl3ApplicationConfiguration config = new Lwjgl3ApplicationConfiguration();
int samples = 2; // you can also play around with hiher values like 4
config.setBackBufferConfig(8, 8, 8, 8, 16, 0, samples); // 8, 8, 8, 8, 16, 0 are default values
Related