Panagiotis Tsiapkolis

Dither Shader

Context

A shader I made while on vacation for fun. I wanted to make something reminiscent of older pixel art graphics, akin to the PC-98.

Its surprisingly more flexible than when I first imagined it, and was my first experience with Godot shaders, so overall it was pretty interesting.

Technical Details

The basic idea is to have two colors : a "light" and "dark" one. The shader then takes the diffuse coefficient and will choose between the two, using a texture.

This texture is tiled over the screen and sampled to find the threshold used for the color choice. Using a specifically made texture, it is possible to make it so intermediate values are represented through dithering, which is the wanted effect.

This simple design can be used for larger scale patterns, but tends to incur less visually pleasing results, mainly because of the fact that the pattern is fixated to the screen, creating a shower door effect. Surprisingly, this doesn't apply nearly as much to the dithering patterns I used, which I think is because the scale is so small that the eye will treat it as "noise" and integrate it.