Dithering

TD COMPs / TOPs / 2023 – Present

Dithering is the process of reducing color or intensity precision while preserving the perception of detail through structured distribution of quantization error. Instead of simply truncating values to a lower bit depth, dithering introduces spatial variation — either through ordered patterns, noise, or error diffusion — to simulate tones that no longer exist in the reduced color space.

This collection of components explores several classical and modern dithering strategies. Each operator provides explicit control over bit depth, output format, and pattern behavior, allowing dithering to function not only as a technical solution for color reduction, but also as a deliberate aesthetic tool.

Index:
Bayer Matrix Dither, Error Diffusion Dither, IGN Dither, Noise Dither

Bayer Matrix Dither

Ordered Dithering

This component iimplements ordered dithering using a structured threshold matrix. Instead of diffusing quantization error across neighboring pixels, this method compares each pixel value against a repeating threshold pattern derived from a Bayer Matrix. The result is a deterministic, grid‐based distribution of quantization error.

For each pixel, the input value is first quantized to the selected bit depth. A position‐dependent threshold from the Bayer Matrix is then applied, determining whether that pixel rounds up or down within the reduced color space. This produces a controlled spatial pattern that simulates intermediate tones through structured pixel arrangements rather than randomness.

The Bayer Matrix itself is a structured threshold kernel used to distribute quantization error spatially. For example, a 3×3 Bayer Matrix can be defined as:

B 3 = 1 9 [ 0 7 3 6 5 2 4 1 8 ]

And a common 4×4 Bayer Matrix is defined as:

B 4 = 1 16 [ 0 8 2 10 12 4 14 6 3 11 1 9 15 7 13 5 ]

Because of its deterministic nature, Bayer dithering produces crisp, geometric structures that emphasize grid alignment and spatial rhythm — making it both a technical quantization strategy and a deliberate graphic aesthetic.

Resources:

Bayer Dithering by surma.dev,
Ordered Dithering on Wikipedia,
Download the .tox files

Parameters

Matrix Scale:

Defines the dimensions of the Bayer threshold matrix used for dithering. Larger values increase the pattern size and spatial repetition.

Pattern Tiling:

Specifies how the Bayer matrix is tiled across the image:
Repeat tiles uniformly, while Mirror alternates orientation to reduce visible seams.


Bit Depth:

Defines the target bit depth used for quantization during dithering.

Pixel Format:

Specifies the output image pixel format.

In‐ / Outputs

Input 0TOP image to be dithered.

Output 0TOP dithered image.

Updated21/2/2025


Error Diffusion Dither

Sub-Title

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Enim diam vulputate ut pharetra sit amet aliquam. Integer eget aliquet nibh praesent tristique magna sit. Massa id neque aliquam vestibulum. Egestas diam in arcu cursus euismod quis viverra nibh. Ultrices vitae auctor eu augue ut lectus arcu bibendum at. Vel risus commodo viverra maecenas accumsan lacus vel facilisis volutpat. Sit amet cursus sit amet dictum sit. Scelerisque mauris pellentesque pulvinar pellentesque habitant morbi tristique. Rutrum quisque non tellus orci ac.

Resources:

Download the .tox files

Parameters

Algorithm:

Selects the error diffusion kernel used to distribute quantization error across neighboring pixels. Options are:
Floyd‐Steinberg, Jarvis‐Judice‐Ninke, Stucki, Atkinson, Burkes, or Sierra.

Alternate:

Defines the Sierra diffusion kernel variant to use:
Full, Two‐Row, or Lite.


Bit Depth:

Defines the target bit depth used for quantization during dithering.

Pixel Format:

Specifies the output image pixel format.

In‐ / Outputs

Input 0TOP image to be dithered.

Output 0TOP dithered image.

Updated21/2/2025


IGN Dither

Sub-Title

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Enim diam vulputate ut pharetra sit amet aliquam. Integer eget aliquet nibh praesent tristique magna sit. Massa id neque aliquam vestibulum. Egestas diam in arcu cursus euismod quis viverra nibh. Ultrices vitae auctor eu augue ut lectus arcu bibendum at. Vel risus commodo viverra maecenas accumsan lacus vel facilisis volutpat. Sit amet cursus sit amet dictum sit. Scelerisque mauris pellentesque pulvinar pellentesque habitant morbi tristique. Rutrum quisque non tellus orci ac.

Resources:

Download the .tox files

Parameters

Bit Depth:

Defines the target bit depth used for quantization during dithering.

Pixel Format:

Specifies the output image pixel format.

In‐ / Outputs

Input 0TOP image to be dithered.

Output 0TOP dithered image.

Updated21/2/2025


Noise Dither

Sub-Title

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Enim diam vulputate ut pharetra sit amet aliquam. Integer eget aliquet nibh praesent tristique magna sit. Massa id neque aliquam vestibulum. Egestas diam in arcu cursus euismod quis viverra nibh. Ultrices vitae auctor eu augue ut lectus arcu bibendum at. Vel risus commodo viverra maecenas accumsan lacus vel facilisis volutpat. Sit amet cursus sit amet dictum sit. Scelerisque mauris pellentesque pulvinar pellentesque habitant morbi tristique. Rutrum quisque non tellus orci ac.

Resources:

Download the .tox files

Parameters

Noise Type:

Selects the noise distribution used for dithering:
Random (GPU), White Noise, or Blue Noise.

Seed:

Defines the seed value used to generate the random noise pattern.
Active when Noise Type is set to Random (GPU).

Noise Dimensions:

Specifies the resolution of the noise texture used for dithering.
Active when Noise Type is set to White Noise or Blue Noise.

Noise Tiling:

Defines how the noise texture is tiled across the image (Repeat or Mirror).
Active when Noise Type is set to White Noise or Blue Noise.


Bit Depth:

Defines the target bit depth used for quantization during dithering.

Pixel Format:

Specifies the output image pixel format.

In‐ / Outputs

Input 0TOP image to be dithered.

Output 0TOP dithered image.

Updated21/2/2025