A1.31.4Ditheringdesign

Adding smoother transitions or dither noise weakens edge-enhancement artifacts

Aliases: error diffusion · noise masking

What it is

Since visible stripes in a gradient are often not a quantization-precision problem but the result of edge enhancement amplifying an already-tiny step, the fix doesn't have to be a higher bit depth — it can instead attack the regular step structure that edge enhancement needs to lock onto in the first place. Common approaches are adding dithering noise, or widening and softening the transition between levels, so that what was a crisp, regular, fixed-position step edge becomes blurred, irregular, or disappears altogether.

Why it happens

Edge enhancement depends on a fixed-position, consistently-directed luminance step: a receptive field has to sit stably straddling the same boundary for the center and surround to produce a sustained, one-directional asymmetric imbalance, which is what generates the overshoot. Dithering works by adding a tiny random or pseudo-random perturbation to each pixel, breaking up what was a straight boundary line into a jagged, pixel-by-pixel randomly distributed edge. Once that happens, no fixed-position receptive field sits stably straddling the same boundary any more — the asymmetric imbalance no longer happens repeatedly at the same location and in the same direction, so the overshoot effect gets averaged out by spatial randomization instead of accumulating into a visible narrow band. Softening the transition (widening the gradient's transition span, adding more intermediate levels) takes a different route: it directly lowers the luminance-difference gradient between adjacent regions, making each individual step small enough that even though edge enhancement is still active, the overshoot it produces shrinks proportionally to an imperceptible level. What the two approaches share is that neither changes the overall average-brightness trend the gradient conveys — they just attack the problem from two different angles, "breaking up the edge's regularity" versus "shrinking each individual step's steepness," and both leave edge enhancement without a stable target to amplify.

Where it stops holding

  • Dithering strength needs careful tuning: too little noise fails to break up the boundary and stripes remain visible; too much introduces visible grain or noise of its own, trading one visual artifact for another — the right amount depends on the original step size, display resolution, and viewing distance.
  • Softening the transition requires actually having more usable intermediate levels or more rendering precision to allocate; if the final output format's bit depth is a hard constraint, simply widening the gradient's span without adding levels doesn't actually reduce each step's physical steepness.
  • Both approaches address edge enhancement's amplification of gradient steps. If the stripes are actually caused by a genuinely too-low number of quantization levels, with the physical step already exceeding the ordinary visibility threshold, masking it with dithering alone will just make the image look dirty rather than actually fixing the underlying coarseness — that case calls for fixing the quantization level count first, not adding noise.

Applying it

  • In scenarios where a gradient could trigger false contouring (background gradients, lighting/shadow transitions, data-visualization color scales), apply moderate dithering or error diffusion by default at the rendering or export stage, rather than waiting for a "I can see stripes" report to investigate.
  • Calibrate dithering strength to the target display and viewing scenario rather than applying one fixed-magnitude parameter across all output sizes and distances; assets viewed small and close can typically tolerate less noise than assets viewed large and far.
  • When the gradient's own parameters can be adjusted, prefer widening the span or adding intermediate levels to lower each step's steepness, used together with dithering rather than relying on either technique alone.
  • Verification: on the target device and at a typical viewing distance, compare the same gradient before and after adding noise or smoothing — via a real capture or screenshot — to confirm the stripes are now hard to notice, while also checking whether this introduced new, noticeable grain; check both directions.

Related

  • Same group: A1.31.1 The visual system actively boosts contrast at luminance step edges, producing Mach bands · A1.31.2 Edge enhancement comes from lateral inhibition, not a change in physical luminance · A1.31.3 Mach banding in smooth gradients gets misread as color banding or posterization defects
  • Nearby: A1.04 Contrast Sensitivity and Spatial Frequency Channels
  • Search terms: dithering · error diffusion · noise masking · false contouring

Cards in the same group

Quick Actions

Share

Share this page

ios_share

https://hci.top/en/handbook/A1.31.4