05 Anti Aliasing - inanevin/LinaVG GitHub Wiki

LinaVG doesn't rely on any GPU based anti-aliasing methods, but rather draws additional anti-aliased borders for every single shape, outline, line it draws on the CPU. You can easily combine this with any other AA methods your application uses, such as MSAA or post-process based methods such as FXAA to increase the image quality.

If you look at the zoomed image below, you can see the "blur" caused by anti-aliasing rectangle corners, both for the outline-corners and where the outline intersects with the actual white shape.

image

You can configure how thick the anti-aliased borders will be, via a config parameter:

Config.aaMultiplier = 5.0f;

image

You can see a much bigger AA multiplier extrudes the AA borders a lot more, blurring the final image more. A good value would be somewhere between 1.0f - 2.5f. LinaVG also takes your frame buffer scale into account, so on higher resolution screens the AA borders will be thicker (assuming that you update the Config.frameBufferScale according to your current scale).

Finally, you can disable anti-aliasing all together. This is suggested if your application already uses MSAA buffers, or have a decent AA post-processing and the visuals look appealing without LinaVG's AA to save some performance.

Config.aaEnabled = false;