|

Coverage layer

Here, we examine what happens to a translucent stroke before it reaches the canvas.

When the geometry of a translucent stroke covers the same pixel more than once (for example, when a bend causes the ribbon to fold over itself), the pixel is composited repeatedly, creating dark creases. To prevent this, we use an offscreen buffer. First, we render each stroke into the buffer on its own, using MAX blending. No matter how many times a stroke covers a pixel, only its greatest coverage is retained. We then composite the buffer onto the canvas exactly once.

The buffer, live

open full size ↗

Draw with a broad charcoal brush on the left half. The right half displays the coverage buffer as you draw. Curl the stroke tightly back over itself and watch both sides: the buffer shows the mark at uniform strength, with folds already reduced to a single coverage.

Single Color

open full size ↗

MAX preserves single coverage in the alpha channel. When a mark folds over itself, the buffer retains only the greatest coverage, so the overlap neither darkens nor doubles.

Multi Colors

open full size ↗

A brush lays down two pigments. Taking the per-channel maximum of two hues pushes the result toward white (for example, cyan over red produces white), so a two-color stroke would blow out where it crosses itself. A multicolor mark still uses MAX blending for coverage, but composites color with standard blending, allowing the top layer to win. The pigments then blend as they layer at the crossing instead of becoming brighter. Draw a self-crossing loop and watch the colors blend rather than lighten.