2.9.16
Coherent GT
A modern user interface library for games
Anti-aliasing

Anti-aliasing is critical for achieving amazing visual results. Coherent GT employs many techniques that provide AA while keeping performance very high. All geometry rendered with Coherent GT is automatically anti-aliased with custom algorithms. The render target you provide should generally NOT use MSAA. MSAA is a good general technique but requires a lot more GPU memory. Coherent GT will work equally well on a non-MSAA and MSAA render targets.

Anti-aliasing clipping regions

Note
This section only applies to AA of clip regions (masks)

Clipping in Coherent GT uses the stencil buffer and is an often used operation in HTML rendering. Usually all content inside a <div> that has border-radius introduces a clipping operation. By default clipping is not anti-aliased for performance reasons. If you need AA on a clip on a layer - you can add it using the -coherent-layer-clip-aa: on; style. This is a big win compared to pre-1.7 versions of Coherent GT where clipping was AA all the time, but impacted performance. Now developers are in full control when and where to apply the clip AA per-layer.

Note
-coherent-layer-clip-aa forces the element to become a layer and uses MSAA when rendering just that layer. Layers with AA clipping use more GPU memory but the runtime performance impact is negligible on modern hardware.
Warning
If you have multiple nested elements with clipping in need of AA - set it on their parent, otherwise they won't intersect each other which won't be the expected result.

Only use -coherent-layer-clip-aa: on; on elements that will benefit from it and where is a clear visual win of having AA clipping. When using the property only set it on the elements that do the clipping. Avoid setting the property on layers that are very large, because it'll increase the GPU memory consumption of the application.

ClipAA.png
Zoomed rounded-rect without/with AA clip