← back to roto on ba3a.dev

RampDither

object RampDither

Softens the edge between two neighbouring steps of one ramp with a checkerboard: on the darker side of the edge, every pixel at an even place of the 2×2 Bayer matrix takes the lighter step. Only within a zone and only between adjacent steps, so an outline or a change of material is never dithered. Off unless the clip asks for it.

Functions

Link copied to clipboard
fun dither(draft: Draft, zoneColours: List<List<Int>>): Draft

draft with the dither applied, where zoneColours lists each zone's ramp as palette labels.