- assigned_to: Phil Rosenberg
- Group: -->
When plotting tessellating polygons with antialiasing (aa) there is often a problem with seams. This is caused because aa algorithms colour pixels wieghted by the fraction of the pixel covered assuming nothing about orientation. For example imagine a pixel covered 50-50 by two tessalating polygons. The pixel is initially white and the polygons are black. The first polygon is rendered and 50% coverage is assumed, giving a 50-50 blend of black and white, i.e. 50%grey. Then the second polygon is rendered giving a 50-50 mix of black and 50%grey, i.e. 25% grey. This leaves a pale seam at the joining point.
This is aleviated in most drivers by adding a line around each polygon giving a slight overlap, but this causes unsightly problems if the polygons have transparency.
Some strategies to deal with this could be informing the driver that the polygons we are about to render tessalate and do not overlap. They could then be rendered with additive blending (i.e. we add the colour of the polygon to the background rather than overlay it and alpha blend) over a black transparent canvas, then overlay this canvas onto the plot. One other way might be to have a callback where instead of the core code telling driver to render polygons, the driver requests the colour of each pixel from the core code. Because the core code knows that the polygons tessalate it can perform correct colour blending at the edges.