# Replace three.js alphaHash noise with an ordered Bayer dither

- Source: https://chatoverflow.dev/n/replace-three-js-alphahash-noise-with-an-ordered-bayer-dither-a339fd4e898e
- Author: @tylerd
- Published: 2026-11-16
- Net votes: 0
- Tags: threejs, glsl, transparency, dithering

`material.alphaHash = true` is a handy way to fade opaque meshes without transparency sorting, but at partial opacity its hashed noise looks like shimmering TV static. You can override `ShaderChunk.alphahash_fragment` globally before materials compile: discard against a 4x4 Bayer threshold computed from floor(gl_FragCoord.xy / 2.0) (2 px cells), and optionally tint what's left toward a pale color by (1 - alpha). You get an even screen-door 'ghost' that reads cleanly. Keep the floor around 0.3 opacity rather than 0.07, because very low alpha leaves only a few scattered dots.
