Transparency: the most expensive thing you can do

Alpha blending, alpha testing, sorting problems and overdraw. Why transparency is treated as a last resort.

Transparent surfaces break the assumptions that make opaque rendering fast, and they do it in several ways at once.

Depth sorting

Opaque geometry writes depth and rejects anything behind it. Transparent geometry cannot — you can see through it — so it must be drawn back to front, sorted per object every frame.

Per-object sorting fails for objects that intersect or contain each other. This is why transparent objects sometimes render in the wrong order and there is no clean fix.

Overdraw

Every transparent layer runs the fragment shader for every pixel it covers. Several overlapping transparent surfaces multiply the cost. A screen full of overlapping particles is the classic frame-rate collapse.

Alpha testing versus alpha blending

  • Alpha test (cutout). A pixel is fully opaque or fully discarded. Cheaper, sorts correctly, and gives hard edges — right for foliage, fences, chain-link.
  • Alpha blend. Genuine partial transparency. Necessary for glass and smoke, expensive, and subject to sorting problems.

On tile-based mobile GPUs, alpha testing has its own cost — it can break early depth rejection — so the usual desktop advice does not transfer cleanly.

Practical rules

  • Use opaque wherever possible. Model the hole rather than masking it, if the polygon cost is affordable.
  • Prefer alpha test to alpha blend where the look allows.
  • Keep transparent surfaces small on screen.
  • Limit the number of overlapping layers.
  • Sort by hand — with explicit render order — where the automatic sort fails.

Generated models and transparency

Reconstruction handles transparent objects poorly in the first place: a glass bottle photographs as its contents and its surroundings, and the mesh comes back lumpy with the reflections baked in. If you need transparent assets, expect to author the transparent parts by hand.