Skip to Content
DocumentationFeaturesDither Transparency

Dither Transparency

Dither Transparency uses a screen-space Bayer pattern (or blue noise) to discard pixels by alpha. Unlike alpha blending, the material stays in the Opaque queue, so it sorts perfectly, casts shadows, and survives MSAA without fringing. The trade-off is a slightly stippled look that TAA or FSR tend to clean up.

When to use it

  • Camera-occluder fade — keep shadow casting while the wall fades.
  • Distant foliage — fade billboards without queue sorting.
  • World-space overlays — no sorting bugs against particle FX.
  • Cross-fading LODs without depth artifacts.

How it works

For each pixel the shader looks up an 8x8 Bayer pattern (or 64x64 blue noise) in screen space, compares alpha < pattern[uv], and clips if the test fails. The material stays in the Opaque queue and follows the standard depth and shadow path.

Smooth gradient, but no shadow caster and sort artifacts behind particles.

Stippled, but sorts perfectly, casts shadows, and shows no fringe under MSAA.

Alpha-blend · 0.5
Dither · 0.5

The same alpha rendered with alpha blending and with dither. Drag to compare.

Properties

Inspector labelShader propertyTypeDefaultDescription
Enable Dither_DitherEnabledToggleOffMaster toggle.
Alpha_DitherAlphaFloat (0–1)1.0Per-pixel alpha compared against the pattern.
Pattern_DitherPatternEnumBayer8Bayer4, Bayer8, or BlueNoise.
Pattern Scale_DitherScaleFloat (1–8)1.0Pattern cell size in pixels.
Temporal Jitter_DitherTemporalToggleOffJitter the pattern across frames for TAA smoothing.
Depth Write_DitherDepthWriteToggleOnDisable to skip Z-write on dithered pixels.

Usage

  1. Enable Dither Transparency and leave the Blend Mode at Opaque.
  2. Drive Alpha from a script (0 = invisible, 1 = solid). Pair with Fade by Distance for camera occluders.
  3. Pick Bayer8 for stable patterns or BlueNoise for an organic stipple.
  4. Turn on Temporal Jitter if your project uses TAA.
material.SetFloat("_DitherEnabled", 1f); material.SetFloat("_DitherAlpha", 0.5f); material.SetFloat("_DitherTemporal", 1f);

Tips & gotchas

  • Without TAA the stipple is visible — fine for stylized or retro looks, and smooth under TAA or FSR.
  • Use BlueNoise for cinematics and Bayer for gameplay, where stable patterns are easier on the eyes.
  • Cost is one texture sample plus a clip, cheaper than alpha blending.
  • The pattern is screen-space, so verify both eyes match in single-pass stereo by enabling temporal jitter.
Last updated on