Blue noise dithering shader

Just another dithering shader with up to date dithering:

Features:

  • has a parameter for target color depth in bits per channel 1.0-8.0
  • has a parameter for ega palette 0.0 or 1.0

gizmo-crt-shader/glsl_shaders/dithering at main · gizmo98/gizmo-crt-shader · GitHub

2Bit per channel examples:

No dithering

Bayer 4x4

Blue noise

EGA palette: No dithering

Bayer 4x4

Blue Noise

2 Likes

I think 2nd picture is the best. Bayer 4x4

Yep. Something looks wrong if i zoom in blue noise screenshots. I need to align input and noise texture.

Ok. I have added bayer 4x4 to glsl-shaders. Blue noise needs some love to align noise pattern with input puxel pattern.

1 Like

Just fixed it in a slang shader with texelFetch.

Source: gizmo-crt-shader/slang_shaders/dithering at main · gizmo98/gizmo-crt-shader · GitHub

2Bit per channel - no dithering

2Bit per channel - blue noise

2Bit per channel - blue noise - ega palette

4Bit per channel - blue noise

3 Likes

I added a monochrome parameter and a shader variant which uses different blue noise textures for every frame so the dithering pattern does not look static.

Monochrome can be used to play snes games on a monochrome LCD :exploding_head:.

1Bit monochrome

2Bit monochrome

2 Likes

Blue noise dithering and bayer 4x4 are now part of libretro slang-shaders.

Dynamic shader can be also used to limit color banding on 16-18Bit output devices which only support RGB565, RGB555 or RGB666 i think.

1 Like