Feiyang Zhou
Gallery

Games Process 3 of 12

Stylized dithering shaders

A screen-space dithering post-process in Unity with swappable palettes and dither textures, RGB or HSL quantization, and contrast control.

Unity scene of a construction-site room rendered in a teal and rust dithered palette.The same room in a dusty purple and cream palette.The same room in a four-color brick red, black and cream palette.The same room in a sky-blue and deep violet palette.Close-up of a paint bucket and tripod in purple and cream with a coarse ordered dither pattern.The same close-up with a fine, irregular blue-noise dither.The same close-up where the light areas are filled with crossing pencil strokes.The full room with pencil-stroke hatching over the walls and floor.The room in blue and yellow, with hues close to the original scene.The room in pale and deep blues with tan floor patches.Grayscale dithered room where the shadows crush to solid black.The same grayscale room brightened so floor and wall detail survives.
1 / 12 Blue to Orange 14-color palette, Bayer 4×4 dither

Built as technical artist on a team project: dither pattern, resolution and color palette are all exposed, so the same scene can be re-dressed in minutes.

The shader takes palettes and dither textures of any size: a 1×14 strip of colors, a Bayer matrix, blue noise, even a pencil-stroke texture. Colors can be quantized in RGB or HSL. HSL keeps the original hues better, while RGB behaves more like a color-grading map. A contrast control lets detail survive in dark scenes.

For speed, the RGB-to-HSL conversion replaces the usual branching with a component-masked matrix multiplication, so the GPU does it as one linear operation.

Tools

  • Unity
  • HLSL

Do not press

This lets the cat loose on the page for 30 seconds. It will press things and knock the page about. You can stop it any time by grabbing the cat. Everything goes back afterwards.

Stop the cat?

Everything goes back where it was.