The 3D Handbook
Key term

Opacity, masked and translucent materials

The three ways engines draw see-through surfaces, masked (alpha test), translucent (alpha blend) and dithered or hashed; what each costs, why foliage thins out at a distance and how coverage-preserving mips fix it, sorting and shadow problems, alpha to coverage, and the settings in Unreal, Unity, Godot and glTF.

materialsshadersfoliageoptimisation

Engines have three ways to draw a surface you can partly see through. Masked materials (alpha test, cutout) keep or discard each pixel. Translucent materials (alpha blend) mix each pixel with what is behind it. Dithered or hashed materials fake partial opacity with a pattern of kept and discarded pixels. glTF names the first two: in MASK mode the output "is either fully opaque or fully transparent", used for "tree leaves or wire fences", while BLEND is "combined with the background", used for "gauze cloth or animal fur" (Khronos Group: glTF 2.0 Specification).

Picking the right one is one of the most common performance and quality decisions in foliage, hair, fences, glass and effects.

Three panels of the same soft-edged green leaf shape on a blue background, drawn in large pixels. Left, masked: every pixel fully green or fully background, giving a hard stepped edge; notes say each pixel on or off, writes depth and casts shadows, hard aliased edge. Centre, translucent: the edge fades smoothly through partly transparent pixels; notes say mixes with what is behind, soft edge, needs sorting, costly and often no shadows. Right, dithered: pixels near the edge randomly on or off, giving a speckled fade; notes say on or off per pixel by pattern, behaves like masked, noisy until TAA blurs it.
The same alpha channel drawn three ways. Only blending gives true partial opacity; masked and dithered keep the cheaper rules of opaque rendering.Diagram by the handbook author

#Masked (alpha test)

Each pixel compares its alpha against a threshold. glTF: "If the alpha value is greater than or equal to the alphaCutoff value then it is rendered as fully opaque, otherwise, it is rendered as fully transparent" (Khronos Group: glTF 2.0 Specification). Unreal calls this the Opacity Mask Clip Value: pixels above it are drawn and pixels below are discarded (Unreal Engine documentation: Unreal Engine Material Properties). Unreal adds that masked pixels "simply do not draw; you will not see any reflections in those areas" (Unreal Engine documentation: Material Blend Modes).

Because surviving pixels are opaque, masked materials write depth and need no sorting (Khronos Group: glTF 2.0 Specification), and they cast shadows. Godot's Alpha Scissor mode "supports casting shadows" and is "faster to render than alpha blending, but slower than opaque rendering" (Godot Engine: BaseMaterial3D class reference).

Two green painted spirals on a grey background. The left one, labelled Transparency, has soft blurred edges; the right one, labelled Alpha Scissor, has crisp hard edges.
The same soft-edged texture with alpha blending (left) and alpha scissor (right). Blending keeps the soft falloff; the scissor threshold cuts it to a hard edge. Screenshot from the Godot documentation's comparison of the two transparency modes.Godot Engine documentation (Juan Linietsky, Ariel Manzur and the Godot community), CC BY 3.0
Ground-cover weeds built from a leaf atlas, the classic use of masked materials. Saputra credits Dmitriy Korotkov's "Alpha Cut Vegetation for Performance" among his references (ArtStation: Project: Villa | Part 01b - Weeds Breakdown). Compare the atlas with the plants: every leaf edge is a cutout decided by the alpha channel.Davin Saputra, via ArtStation

The downside is a hard, aliased edge. MSAA does not help, because shaders still run once per pixel, so it "does not reduce transparency aliasing for materials using the Alpha Scissor transparency mode" (Godot documentation: 3D antialiasing). Alpha to coverage fixes this by feeding alpha into the MSAA sample mask; Godot says it is "effective at reducing aliasing on transparent materials without introducing any blurriness", at a moderate cost (Godot documentation: 3D antialiasing).

A real-time pine of 1,048 triangles in total: trunk and branches on a 2K PBR set, and hand-painted needles on alpha cards with a 1K set (Sketchfab: Stylized Pine Tree - Free PBR Game Asset). Turn on wireframe in Sketchfab's model inspector: the needle clumps are flat cards, and the alpha mask cuts out the shape you see. Orbit to look along a card edge-on to find where the illusion breaks.Anton 3D, via Sketchfab

#Why foliage disappears at a distance

Mipmaps average the alpha channel, so fewer pixels pass the cutoff in each smaller level. Ignacio Castaño saw this when building trees: "As the trees moved farther away from the camera, the leafs faded out becoming almost transparent" (Ludicon: Computing Alpha Mipmaps).

Vegetation atlases from a recent open-world game (ArtStation: Assassin's Creed Shadows: Foliage). On an atlas like this, the thinnest parts of each leaf are the first to fall below the cutoff in small mips, which is why foliage textures need coverage-preserving mips.Théophile Lebeau, via ArtStation

#Translucent (alpha blend)

Blending gives real partial opacity: smoke, glass, water surfaces, soft hair tips. It is also the most expensive and least reliable mode.

Two panels each with a green torus, a pink sphere and a blue sphere. In the left panel, labelled Incorrect sorting, the pink sphere is drawn in front of the torus although it sits behind it. In the right panel, labelled Correct sorting, the objects overlap in the right order.
Sorting in practice: with alpha-blended materials (left) the pink sphere draws over the torus in front of it; with alpha scissor materials (right) depth decides and the overlap is correct. Screenshot from Godot.Godot Engine documentation (Juan Linietsky, Ariel Manzur and the Godot community), CC BY 3.0

Other blend modes are cheaper special cases: Additive adds to the background (fire, glows) and Modulate multiplies it (stains, tinted glass) (Unreal Engine documentation: Material Blend Modes).

#Dithered and hashed

A dithered material is a masked material whose threshold changes from pixel to pixel in a pattern. Unreal's Dither Opacity Mask, combined with temporal antialiasing, gives a limited form of translucency that supports all lighting features (Unreal Engine documentation: Unreal Engine Material Properties). Godot's Alpha Hash uses "a spatially-deterministic threshold", supports shadows, and "is suited for hair rendering" (Godot Engine: BaseMaterial3D class reference).

Chris Wyman's GDC 2017 talk on hashed alpha testing explains why: ordinary "alpha-tested geom can disappear w/ distance", so hashing uses "stable, procedural noise" for the threshold (GDC 2017: Hashed Alpha Testing). The price is visible noise; the talk lists temporal antialiasing, which "integrates sub pixel noise samples", as one way to deal with it (GDC 2017: Hashed Alpha Testing). The same technique is used to fade LODs in and out; Unreal has a per-material Dithered LOD Transition option (Unreal Engine documentation: Unreal Engine Material Properties).

A green capsule in the Godot editor viewport fading out towards the camera. The faded part is made of a fine pattern of drawn and missing pixels, and the capsule still casts a solid blue shadow on the floor.
Godot's Pixel Dither distance fade approximates transparency "by only having a fraction of the pixels rendered". Note the dot pattern on the faded end and the shadow, which a blended fade would lose. Screenshot from Godot.Godot Engine documentation (Juan Linietsky, Ariel Manzur and the Godot community), CC BY 3.0

#In different tools

Masked Translucent Dithered / hashed
Unreal Blend Mode Masked, Opacity Mask Clip Value (Unreal Engine documentation) Translucent, Additive, Modulate, AlphaComposite (Unreal Engine documentation) Dither Opacity Mask
Unity HDRP Alpha Clipping ("acts like a Cutout Shader") (High Definition Render Pipeline manual 17.0) Surface Type Transparent, Blending Mode Alpha Custom shader
Godot Alpha Scissor (Godot Engine) Alpha, Alpha Depth Pre-Pass Alpha Hash
glTF alphaMode: MASK + alphaCutoff (Khronos Group) alphaMode: BLEND Not defined

#Further reading and watching

Related: foliage and vegetation, overdraw, impostors and billboards, decals, mipmaps.

References

  1. Khronos Group · glTF 2.0 Specification · Khronos Group (GitHub) · docs · accessed 2026-10-21
  2. Epic Games · Unreal Engine Material Properties · Unreal Engine documentation · docs · accessed 2026-10-21
  3. Epic Games · Material Blend Modes · Unreal Engine documentation · docs · accessed 2026-10-21
  4. Godot Engine contributors · BaseMaterial3D class reference (source) · Godot Engine (GitHub) · docs · accessed 2026-10-21
  5. Davin Saputra · Project: Villa | Part 01b - Weeds Breakdown · ArtStation · web · accessed 2026-10-22
  6. Godot Engine contributors · 3D antialiasing (documentation source) · Godot documentation (GitHub) · docs · accessed 2026-10-21
  7. Anton 3D · Stylized Pine Tree - Free PBR Game Asset · Sketchfab · web · accessed 2026-10-22
  8. Ignacio Castaño · Computing Alpha Mipmaps · Ludicon (blog) · article · accessed 2026-10-21
  9. Unity Technologies · Default texture import settings reference · Unity Manual (6000.2) · docs · accessed 2026-10-21
  10. Godot Engine contributors · Importing images (documentation source) · Godot documentation (GitHub) · docs · accessed 2026-10-21
  11. Théophile Lebeau · Assassin's Creed Shadows: Foliage · ArtStation, 2024 · web · accessed 2026-10-22
  12. Unity Technologies · Lit material Inspector reference (HDRP) · High Definition Render Pipeline manual 17.0 · docs · accessed 2026-10-21
  13. Chris Wyman (NVIDIA) · Hashed Alpha Testing (GDC 2017) · GDC 2017, Advances in Real-Time Rendering, 2017 · talk · accessed 2026-10-21

Also consulted

Last updated 2026-10-22